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

K

keobox

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
 
S

Steven D'Aprano

keobox said:
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.

Ask the person who built the system, or the people who made the
distribution. They are free to name the Python executable anything they
like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top