ps with command line arguments

AZ 9901 az9901@gmail.com
Tue May 7 08:46:00 GMT 2013


Hello,

I run a bash script in a multi-user environment.
This script uses "ps -ef" in particular to list all its instances.

On a common UNIX / Linux system, it gives something like this :
bobby     20326 20318  0 10:21 ?        00:00:00 /bin/bash ./myscript.sh
marty     20330 20342  0 10:23 ?        00:00:00 /bin/bash ./myscript.sh
dudul     20339 20363  0 10:25 ?        00:00:00 /bin/bash ./myscript.sh
Perfect !

With Cygwin, "ps -ef" does not give command line arguments, so the script can't list its instances.
I was thinking about using procps or printing /proc/*/cmdline.
However, some of the users do not have admin rights, so they are not allowed to access /proc/<pid>/cmdline, /proc/<pid>/stat etc... of other users...

This is why "ps -ef" giving command line arguments would be really perfect !

But perhaps there is another solution ?

Could you help me ?

Thank you very much,

Best regards,

Ben


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list