This is the mail archive of the
cygwin
mailing list for the Cygwin project.
ps with command line arguments
- From: AZ 9901 <az9901 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 7 May 2013 10:46:25 +0200
- Subject: ps with command line arguments
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