X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Matthew Woehlke <mw_triad@users.sourceforge.net>
Subject:  Re: display ps command line parameters
Date:  Mon, 30 Apr 2007 12:47:57 -0500
Lines: 23
Message-ID: <f15a4e$9ml$1@sea.gmane.org>
References:  <4edba06c76Andy@jet-net.co.uk> <loom.20070430T174617-803@post.gmane.org>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.0
In-Reply-To: <loom.20070430T174617-803@post.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Tony Richardson wrote:
> Andy <at> Jet-Net <Andy <at> jet-net.co.uk> writes:
>> In "ps -s" I get something like:
>>
>>  PID  TTY    STIME COMMAND
>> 1234  con 09:00:00 /path/program
>>
>> Is there a way of doing this through ps (or an alternative) in Cygwin?
> 
> An alternative would be to parse /proc/PID/cmdline.  Arguments are
> separated by null bytes.

cat /proc/$pid/cmdline | xargs -0 echo

um... and since Cygwin has this information, doesn't this mean that 'ps' 
is missing a feature that is standard to pretty much every other *nix 
implementation of 'ps'? (I don't have a POSIX standard handy, but I 
wonder if this is an unnecessary POSIX violation?)

-- 
Matthew
If you believe you received this e-mail in error, you are probably sadly 
mistaken, but if not, aren't you lucky?


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

