Le 7 mai 2013 à 16:39, Warren Young a écrit :

> Your script will also fail on most FreeBSD machines, for example.  On 
> FreeBSD, there is a kernel build option that is often set which prevents user 
> space from *ever* seeing command line options.  It's a security feature, 
> since there are all kinds of things you can learn about other users if you 
> are allowed to see the parameters they pass to their commands.

My "exec" workaround should work on FreeBSD :-) (however not tested on this OS 
yet) : "bash" process name will be replaced in ps output by the name given to 
exec with -a option, so perfect, that's enough !

> Still, if you *must* do this, you can install the 'procps' package.  Its 
> procps.exe command behaves like ps on Linux.

The problem with procps.exe it that it relies on /proc/ : a user which do not 
have admin rights is not allowed to access Cygwin /proc/<pid>/cmdline, 
/proc/<pid>/stat etc... of other users (although on Linux for example it 
works)...
This bahavior leads to an incomplete / unreliable procps output.


--
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

Reply via email to