why ps/fname of a python interpreter changes across platforms?

keobox keobox at gmail.com
Fri Sep 16 05:30:08 EDT 2011


Hello,
I'm writing a little supervisor of some python scripts.
To check if the scrips are running I'm using the ps -o pid,fname
command on both RH Linux and solaris 10.
All the scripts are launched using "python script.py" command, they
are not launched with exec permissions.

I don't know why the fname of the python interpreter changes across
platforms.

I saw a "isapytho" in some solaris 10 platforms.
I saw "python2." in some Linux platforms.
On most platforms the value is "python".
Why?

Ok, I know that I can easily work around the problem by not using
"fname" and parse the ps output in another way, but I don't understand
how is possible that the combination of ps and python behaves so
badly.
Any idea?

Regards,
Cesare



More information about the Python-list mailing list