delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/08/23:54:57

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: Tue, 8 Nov 2005 20:54:46 -0800
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: unexpected failure of cygwin32_winpid_to_pid
Message-ID: <20051109045445.GA3296@efn.org>
References: <20051109001741 DOT GA6332 AT efn DOT org>
Mime-Version: 1.0
In-Reply-To: <20051109001741.GA6332@efn.org>
User-Agent: Mutt/1.4.2.1i
X-IsSubscribed: yes

On Tue, Nov 08, 2005 at 04:17:41PM -0800, Yitzchak Scott-Thoennes wrote:
> Using 20051108, I just saw failures twice in tests of the perl binding
> for cygwin32_winpid_to_pid, but no failure on every try since.  The
> test looks like:
> 
> my $catpid = open my $cat, "|cat" or die "Couldn't cat: $!";
> open my $ps, "ps|" or die "Couldn't do ps: $!";
> my ($catwinpid) = map /^.\s+$catpid\s+\d+\s+\d+\s+(\d+)/, <$ps>;
> close($ps);
> 
> is(Cygwin::winpid_to_pid($catwinpid), $catpid, "winpid to pid");
> is(Cygwin::pid_to_winpid($catpid), $catwinpid, "pid to winpid");
> close($cat);
> 
> in perl, where Cygwin::winpid_to_pid internally just calls
> cygwin32_winpid_to_pid.  I'm not able to think of any way in which
> system load or a race could cause this failure.  Any suggestions?

Hmm, I thought I had ruled out exec() of cat failing, but now I don't 
think so; probably that's what it is, so please disregard this message.

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