I don't know such function. But you may write your own by listing and parsing the information from the
/proc/[pid] entries in the proc file system (see
man 5 proc[
^]).
Another solution would be execution of the
ps command with the
popen()
function and parsing the output for the name of the other process.