From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6233 invoked by alias); 28 Nov 2013 16:02:54 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6221 invoked by uid 89); 28 Nov 2013 16:02:54 -0000 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 Received: from Unknown (HELO mho-01-ewr.mailhop.org) (204.13.248.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 28 Nov 2013 16:02:52 +0000 Received: from pool-71-126-240-25.bstnma.fios.verizon.net ([71.126.240.25] helo=cgf.cx) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1Vm43A-000H04-EG for cygwin@cygwin.com; Thu, 28 Nov 2013 16:02:44 +0000 Received: from cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id CD958600DA for ; Thu, 28 Nov 2013 11:02:43 -0500 (EST) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.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 16:02:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: ps shows same process more than once Message-ID: <20131128160243.GB5803@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20131128130813.GH2449@calimero.vinschen.de> <20131128155504.GC5063@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131128155504.GC5063@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-11/txt/msg00456.txt.bz2 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 >>> >>> >>> >>> 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