develooper Front page | perl.perl5.porters | Postings from January 2014

[perl #121028] [PATCH] t/io/closepid.t hangs for test timeout (50 seconds) under harness

Thread Next
From:
Tony Cook via RT
Date:
January 28, 2014 05:48
Subject:
[perl #121028] [PATCH] t/io/closepid.t hangs for test timeout (50 seconds) under harness
Message ID:
rt-4.0.18-16370-1390888126-756.121028-15-0@perl.org
On Fri Jan 24 05:08:05 2014, alh wrote:
> On Tue, Jan 21, 2014 at 11:46 PM, Tony Cook via RT
> <perlbug-followup@perl.org> wrote:
> >
> > This makes sure that $SIG{HUP} is DEFAULT before we expect it to
> > work, though perhaps it should just skip when $SIG{HUP} and complain
> > your system is broken.
> >
> > Preventing openpid.t from delaying processing would require similar
> > changes I think - using 3+ arg open for the pipe opens (to avoid the
> > extra processes) and preventing $SIG{HUP} being ignored.
> >
> > Note that the problem in both cases isn't that (open|close)pid.t is
> > waiting, but that harness is waiting for the stdout handle from the
> > children to be closed.
> 
> Awesome, this works great for me.
> 
> How do you feel about applying this to other places where
> HUP/open()/kill are combined for this sort of functionality?
> 
> If you're busy I'd be willing to throw this together.

The attached patch allows openpid.t to finish quickly under harness on Linux - *but* fails horribly on Win32:

C:\Users\tony\dev\perl\git\perl\t>.\perl io\openpid.t
1..10
List form of pipe open not implemented at io\openpid.t line 56.
# Looks like you planned 10 tests but ran 0.

Implementing list form pipes on Win32 is complicated by there being no standard command-line argument parsing mechanism - apparently VB for example uses different rules to the CRT.

This isn't a problem for closepid.t, since that test is skipped on Win32.

An option might be to implement list form pipes for Win32, but I'm not sure I want to jump down that rabbit hole.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121028

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About