News for hackers. Stuff that matters.
Re:A prog by any other name by raimue on Thursday April 28, 2016 @01:39PM (#11590588)
setproctitle() is only for the current process. It is a system-specific interface implemented in libc (in OpenBSD/FreeBSD a sysctl() to set the memory address where the string is stored).

ps(1) examines other processes and again uses a system-specific interface to the kernel to retrieve all information about other processes (using kvm(3) on OpenBSD/FreeBSD).

Re:A prog by any other name by umanwizard on Thursday April 28, 2016 @03:16PM (#11591261)
I see. So you could use the same kvm API to get all the proctitles (assuming you're on a bsd), and then filter it yourself to find the one for the current process, right?