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


On 7/27/05, Don Beusee wrote:
> That's not good enough for scripting.  First of all, the command is not so
> simple (you have to grep -v grep also - so that the same script works on
> Unix systems) and if you have small PID number like 14, that will likely
> return lots of other processes (like 114, etc).  Also, the same <PID>
> appears in the PPID column if it has children.  Some Unix variants might not
> have a space in the ps output between the PID and previous or next column
> when one of the column's data is larger than the specified printf format.
> 
> So your command is not reliable enough for scripting and is also very slow
> on large Unix systems with 1000's of processes running.  ps -p <PID> is
> immediate, reliable, and portable (it's SYSV/SVR4 standard).

There's also always http://cygwin.com/contrib.html

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


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