delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/04/15:35:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 4 Aug 2005 15:34:54 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Jason Pyeron <jpyeron AT pdinc DOT us>
cc: cygwin AT cygwin DOT com
Subject: Re: pid confusion and pstree
In-Reply-To: <Pine.LNX.4.62.0508041520500.25913@ns.pyerotechnics.com>
Message-ID: <Pine.GSO.4.61.0508041531470.3695@slinky.cs.nyu.edu>
References: <Pine DOT LNX DOT 4 DOT 62 DOT 0508041520500 DOT 25913 AT ns DOT pyerotechnics DOT com>
MIME-Version: 1.0

On Thu, 4 Aug 2005, Jason Pyeron wrote:

> sorry if this wraps.
>
> what is my WINPID for the current bash?
>
> [jpyeron AT mrlaptop mysql-4.1.13.new]$ ps -W | head -1 && ps -W | grep bash && pstree -Ahup
>       PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
> I    2356       1    2356       2356  con 1003   Jul 31 /usr/bin/bash
>       260       0       0        260    ?    0   Aug  3 C:\cygwin\bin\bash.exe
>       484       0       0        484    ?    0   Aug  3 C:\cygwin\bin\bash.exe
>      3004       0       0       3004    ?    0   Aug  3 C:\cygwin\bin\bash.exe
>       456       0       0        456    ?    0   Aug  3 C:\cygwin\bin\bash.exe
>
> ?(1)-+-bash(2356,jpyeron)
>      |-bash(1516,mkruger)---mysql(476)
>      `-cygrunsrv(3616,SYSTEM)---sshd(2956)-+-sshd(2852)---bash(2544,jpyeron)---mysql(236)
>                                            |-sshd(3884)---bash(928,jpyeron)
>                                            `-sshd(228)---bash(1592,jpyeron)-+-pico(2872)
>                                                                             `-pstree(2348)
>
> [jpyeron AT mrlaptop mysql-4.1.13.new]$ echo $$
> 1592

"ps -W" may not be aware of the Cygwin PID for some processes.
How about "/bin/ps | head -1 && /bin/ps -a | grep $$" instead?

> also does anyone have a patch to show the WINPID for pstree?

I don't think pstree is aware of WINPIDs.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019