Author piro
Recipients amaury.forgeotdarc, asksol, elprans, exarkun, flub, giampaolo.rodola, iElectric, loewis, marcelo_fernandez, piro, serverhorror
Date 2009-12-07.01:13:58
SpamBayes Score 6.69957e-05
Marked as misclassified No
Message-id <>
> It seems that some utilities and programs (killall,
> gnome-system-monitor, and so on) looks for the process name in
> /proc/PID/status, not in /proc/PID/cmdline, so it should be better
> (in Linux), to modify both, /proc/PID/cmdline (changing argv) *and*
> /proc/PID/status (calling prctl()).

> I installed py-setproctitle, and can't kill it with killall once I 
> set the name to "hello", for example. :-(

Just released setproctitle 0.2 where I also call prctl() if available. 
It is actually the string used by killall.

>> For what I observed, clobbering argv changes what shown in
>> ``/proc/PID/cmdline``, whereas prctl changes what can be read in
>> ``/proc/PID/status`` (and ``stat`` too). ``ps`` uses the former, 
>> switches to the latter when calling ``ps a`` and ``ps f``. ``top``
>> toggles between the two pressing ``c``.

> Sorry, but here (Ubuntu 9.10) it works the other way around: "ps"
> lists the /proc/PID/status -> name field and "ps a" lists the
> /proc/PID/cmdline. But I got the explanation. :-)

Yup, sorry: it was the other way round :P
Date User Action Args
2009-12-07 01:14:01pirosetrecipients: + piro, loewis, exarkun, amaury.forgeotdarc, giampaolo.rodola, flub, serverhorror, iElectric, marcelo_fernandez, elprans, asksol
2009-12-07 01:14:01pirosetmessageid: <>
2009-12-07 01:14:00pirolinkissue5672 messages
2009-12-07 01:13:58pirocreate