This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ps with command line arguments


On 5/7/2013 02:46, AZ 9901 wrote:

This script uses "ps -ef" in particular to list all its instances.

Any script that relies on 'ps' output parsing is probably unportable from the get-go.

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.

That aside, you'll also find that different implementations of ps use different column orders, etc.

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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]