Skip Menu |

This queue is for tickets about the IPC-Run CPAN distribution.

Report information
The Basics
Id: 8060
Status: resolved
Priority: 0/
Queue: IPC-Run

People
Owner: RSOD [...] cpan.org
Requestors: tylerm [...] activestate.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.78
Fixed in: (no value)



Subject: run.t failure on FreeBSD (4.5-RELEASE #0)
Hi, First I'd like to thank you for writing IPC::Run; I've used it in several projects since I discovered it a few months ago and it works like a dream. :) This test (in run.t) fails on our FreeBSD box. It signals a "broken pipe", causing none of the remaining tests to run. Using the same build of perl on other OSes (Linux, Solaris, HP-UX and AIX), run.t passes no problem. If I remove this test (and the next few that depend on it), then all the other tests pass. skip_unless_high_fds { $out = undef ; $err = undef ; $fd_map = _map_fds ; $r = run( [ @perl, '-le', 'open( STDIN, "<&3" ) or die $! ; print <STDIN>' ], "3<", \"Hello World", '>', \$out, '2>', \$err, ) ; ok( $r ) ; }, Just letting you know. Thanks, Tyler perl -v: This is perl, v5.6.1 built for i386-freebsd-thread-multi (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com Built 13:21:31 Sep 4 2002 uname -a: FreeBSD clampv45.ActiveState.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Fri Jun 7 16:41:26 PDT 2002 daves@clampv45.ActiveState.com:/usr/src/sys/compile/CLAMPV45 i386
Date: Wed, 20 Oct 2004 15:12:23 -0400
From: Barrie Slaymaker <barries [...] slaysys.com>
To: Guest via RT <bug-IPC-Run [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #8060] run.t failure on FreeBSD (4.5-RELEASE #0)
RT-Send-Cc:
The feature being tested there is using file descriptor number 3 as an inherited file descriptor that the child reads from. Any idea why that fails? That being said, I don't test on FreeBSD here or on older Perls due to lack of tuits, so I'll have to note your issue as an open, low priority (this is really a rare use case :) issue. But I'd love to know why it happens. - Barrie On Tue, Oct 19, 2004 at 05:58:31PM -0400, Guest via RT wrote: Show quoted text
> > This message about IPC-Run was sent to you by guest <> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=8060 > > > Hi, > First I'd like to thank you for writing IPC::Run; I've used it in several projects since I discovered it a few months ago and it works like a dream. :) > > This test (in run.t) fails on our FreeBSD box. It signals a "broken pipe", causing none of the remaining tests to run. Using the same build of perl on other OSes (Linux, Solaris, HP-UX and AIX), run.t passes no problem. > > If I remove this test (and the next few that depend on it), then all the other tests pass. > > skip_unless_high_fds { > $out = undef ; > $err = undef ; > $fd_map = _map_fds ; > $r = run( > [ @perl, '-le', 'open( STDIN, "<&3" ) or die $! ; print <STDIN>' ], > "3<", \"Hello World", > '>', \$out, > '2>', \$err, > ) ; > ok( $r ) ; > }, > > Just letting you know. > > Thanks, > Tyler > > perl -v: > > This is perl, v5.6.1 built for i386-freebsd-thread-multi > (with 1 registered patch, see perl -V for more detail) > > Copyright 1987-2001, Larry Wall > > Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com > Built 13:21:31 Sep 4 2002 > > uname -a: > > FreeBSD clampv45.ActiveState.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Fri Jun 7 16:41:26 PDT 2002 daves@clampv45.ActiveState.com:/usr/src/sys/compile/CLAMPV45 i386
From: Tyler MacDonald <tylerm [...] activestate.com>
Hey, Sarathy checked into this further, and this is what he found: fds upto 4 are in use by default on FreeBSD 4.5, so assume fd 5 is the first free fd in test (this should work on other platforms as well, but I haven't tested that yet) ... so, ~ line 565 in run.t: [ @perl, '-le', 'open( STDIN, "<&5" ) or die $! ; print <STDIN>' ], | "5<", \"Hello World", Kind of odd that FreeBSD chomps on those extra filehandles, but at least now we know :) Cheers, Tyler
From: tylerm [...] activestate.com
Here is a "real" patch to fix this. Cheers, Tyler
diff -dur IPC-Run-0.78.orig/t/run.t IPC-Run/t/run.t --- IPC-Run-0.78.orig/t/run.t 2004-11-05 13:47:47.000000000 -0800 +++ IPC-Run/t/run.t 2004-11-05 13:48:05.000000000 -0800 @@ -562,8 +562,8 @@ $err = undef ; $fd_map = _map_fds ; $r = run( - [ @perl, '-le', 'open( STDIN, "<&3" ) or die $! ; print <STDIN>' ], - "3<", \"Hello World", + [ @perl, '-le', 'open( STDIN, "<&5" ) or die $! ; print <STDIN>' ], + "5<", \"Hello World", '>', \$out, '2>', \$err, ) ;
Thanks, I've applied the patch and the next release to CPAN in 1-3 days will have it. - R. [guest - Fri Nov 5 16:55:46 2004]: Show quoted text
> Here is a "real" patch to fix this. > > Cheers, > Tyler