From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20024 invoked by alias); 2 Dec 2013 05:47:20 -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 20014 invoked by uid 89); 2 Dec 2013 05:47:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-qa0-f41.google.com Received: from Unknown (HELO mail-qa0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 02 Dec 2013 05:47:17 +0000 Received: by mail-qa0-f41.google.com with SMTP id j5so3945552qaq.7 for ; Sun, 01 Dec 2013 21:47:10 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.224.148.9 with SMTP id n9mr35618869qav.32.1385963229838; Sun, 01 Dec 2013 21:47:09 -0800 (PST) Received: by 10.224.34.14 with HTTP; Sun, 1 Dec 2013 21:47:09 -0800 (PST) In-Reply-To: <20131128160243.GB5803@ednor.casa.cgf.cx> References: <20131128130813.GH2449@calimero.vinschen.de> <20131128155504.GC5063@ednor.casa.cgf.cx> <20131128160243.GB5803@ednor.casa.cgf.cx> Date: Mon, 02 Dec 2013 05:47:00 -0000 Message-ID: Subject: Re: ps shows same process more than once From: "George M. Florendo" To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00036.txt.bz2 On 11/29/13, Christopher Faylor wrote: > 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". Oh, I'm sorry too. Didn't get to read your first sentence earlier. I'd rather have a faster cygwin more than a more accurate "ps -W". Thanks for all your help. -- George M. Florendo Programmer http://www.facebook.com/i.am.georgeflorendo -- 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