www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/15/13:19:54

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 15 Jan 2009 13:19:01 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bash doesn't launch the applications directly.
Message-ID: <20090115181901.GA5678@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <gkm1pc$717$1 AT ger DOT gmane DOT org> <496F34BB DOT 6080200 AT byu DOT net> <5a05e0e60901150911i3caa5b66gef6c61d8a6e2ef7d AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <5a05e0e60901150911i3caa5b66gef6c61d8a6e2ef7d@mail.gmail.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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
Note-from-DJ: This may be spam

On Thu, Jan 15, 2009 at 12:11:30PM -0500, Dave Steenburgh wrote:
>Well, now I understand why I occasionally see more instances of bash
>in the task manager than I was expecting.  However, now I have to ask
>why the shim doesn't appear [plainly] with ps:
>
>     4540       1    4540       4540    0 1003 11:48:08 /usr/bin/bash
>     5656    4540    5656       4756    0 1003 11:48:35
>/cygdrive/f/WINDOWS/system32/notepad

Because that's the way ps works.  It shows cygwin pids.  If you really
want to see the shim process you do have to use the task manager.

>5656 is the PID of the shim, and 4756 is the PID of notepad.  I'm
>extrapolating here, so correct me if I'm wrong: whenever the WINPID
>column is different from the PID column, there's a shim process?

No, that's not correct.  WINPID can be unequal to PID in other situations
too.  That's because the Windows API doesn't have anything like exec*().

>The task manager displays both, because they are after all separate
>processes.  Personally, I'd rather see one entry for each process than
>have to notice when PID and WINPID are different.  Out of curiosity,
>what would ps show if somehow the shim was left running long after
>notepad had exited?  Would you still see notepad, or would there be no
>entry at all, or would the shim then be in plain sight?

You are asking for postulation on an event that should never occur but
if the shim still exists cygwin's ps will probably think that there is
still a process with that cygwin pid sitting around.

cgf

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