Message96041
> 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,
but
>> 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:01 | piro | set | recipients:
+ piro, loewis, exarkun, amaury.forgeotdarc, giampaolo.rodola, flub, serverhorror, iElectric, marcelo_fernandez, elprans, asksol |
2009-12-07 01:14:01 | piro | set | messageid: <1260148441.67.0.467818026235.issue5672@psf.upfronthosting.co.za> |
2009-12-07 01:14:00 | piro | link | issue5672 messages |
2009-12-07 01:13:58 | piro | create | |
|