delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/11/28/11:03:23

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=IZ8zi2hJWvDIDTi0youROiBlns7Em/emtEVM5P3gzsrO0/LtuAw7t
n98zn18KkY1IYNOJlARXlSZRbt2jkxG2STglCNvr1evA4zu8TkH2Lg69KtUSudD0
9NVv2F9ehoWO3rcpApc2WLQEFKXRedqnt/xO8EwRqNNmszVqhFxiRQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=3AoYX9tMHuaj0mORB7dlU+7sQ3k=; b=AeY7cn3QugWB2ZRNQ+ohsxJw185K
SJNESgV7YcWUO2jzN9oWWwgCtrx6KEnLeKCULdI4VC94bwQtiDnIwP/aDQULObiQ
e779KqnC4sFQ1NXknow4njxwdHCU1dQNHdS3wTKMWutToWHkpbum7lgdcmEYYZDn
pR5jIUSA3jULucs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2
X-HELO: mho-01-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX192bIlTLeH/Ykqn2u/KT2QM
Date: Thu, 28 Nov 2013 11:02:43 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ps shows same process more than once
Message-ID: <20131128160243.GB5803@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAGaO6c9rxafNajvdzQhngOjTQn+fjjAp9NRLTpYbbgcKHe8R5A AT mail DOT gmail DOT com> <20131128130813 DOT GH2449 AT calimero DOT vinschen DOT de> <20131128155504 DOT GC5063 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20131128155504.GC5063@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.20 (2009-06-14)

On Thu, Nov 28, 2013 at 10:55:04AM -0500, Christopher Faylor wrote:
>On Thu, Nov 28, 2013 at 02:08:13PM +0100, Corinna Vinschen wrote:
>>On Nov 28 15:20, George M. Florendo wrote:
>>> Hi,
>>> 
>>> I run a non cygwin apache process named httpd.exe.  Checking it with
>>> "ps -W" shows a listing of the same process (with PID 4560 in this
>>> case) twice.
>>> 
>>> $ ps -W | grep httpd
>>>      4560    1604    4560       5304  pty0    1000 09:55:21
>>> /home/georgeflorendo/wamp/bin/apache/Apache2.4.4/bin/httpd
>>>      4560    1604    4560       5304  pty0    1000 09:55:21
>>> /home/georgeflorendo/wamp/bin/apache/Apache2.4.4/bin/httpd
>>>      7508       0       0       7508  ?          0 15:09:50
>>> C:\cygwin\home\georgeflorendo\wamp\bin\apache\Apache2.4.4\bin\httpd.exe
>>> 
>>> Doing a "ps aux" shows it only once.
>>> 
>>> $ ps aux
>>>       PID    PPID    PGID     WINPID   TTY     UID    STIME COMMAND
>>>      1340    7856    1340       5720  pty5    1000 15:13:50 /usr/bin/ps
>>>      1604    4008    1604       2292  pty0    1000 09:17:01 /usr/bin/bash
>>>      4008       1    4008       4008  ?       1000 09:17:00 /usr/bin/mintty
>>>      4560    1604    4560       5304  pty0    1000 09:55:21
>>> /home/georgeflorendo/wamp/bin/apache/Apache2.4.4/bin/httpd
>>> 
>>> <snipped>
>>> 
>>> Is it correct that ps -W shows the same process twice?
>>
>>Not exactly but it could happen.  Can you try the latest snapshot Cygwin
>>DLL from http://cygwin.com/snapshots/ and see if it fixes the problem?
>
>I don't see anything in the ChangeLog which would affect this and I'd
>be concerned if there was.
>
>There are scenarios where two different windows pids can be associated
>with the same Cygwin pid.  You should only see it when you do a "ps -W".
>
>So, AFAICT, the correct answer to the "Is it correct" is "Yes'.

Oops.  Sorry.  Just noticed that the pids weren't "different".  There
are still pathological situations where a pid can show up twice when
doing a "ps -W".  I've seen the issue before but fixing it would involve
a global process lock which would slow down Cygwin for the benefit of
a more accurate "ps -W".

cgf

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

- Raw text -


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