Skip Menu |
 

This queue is for tickets about the Timeout-Self CPAN distribution.

Report information
The Basics
Id: 124222
Status: resolved
Priority: 0/
Queue: Timeout-Self

People
Owner: Nobody in particular
Requestors: gortan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.01
Fixed in: (no value)



Subject: Clarify effect on child processes
Download (untitled) / with headers
text/plain 667b
Thanks for your module Timeout::Self, which has proven really useful in our unittests to assure that the CI jobs get finished, even if some bug results in an endless loop. One thing we noticed however is that it doesn't play perfectly nice with programs that fork: While the alarm handler gets cloned to the child process by Perl, the alarm is not set again - so the child process will not time out. While this is of course not Timeout::Self's fault, it would be great if you could either document this fact in the POD, or decide to do something about it: one option is to use https://metacpan.org/pod/fork::hook to re-set the alarm on the forked process... Thanks!
Download (untitled) / with headers
text/plain 902b
On Fri, 26 Jan 2018 13:10:35 GMT, GORTAN wrote: Show quoted text
> Thanks for your module Timeout::Self, which has proven really useful > in our unittests to assure that the CI jobs get finished, even if some > bug results in an endless loop. One thing we noticed however is that > it doesn't play perfectly nice with programs that fork: While the > alarm handler gets cloned to the child process by Perl, the alarm is > not set again - so the child process will not time out. > > While this is of course not Timeout::Self's fault, it would be great > if you could either document this fact in the POD, or decide to do > something about it: one option is to use > https://metacpan.org/pod/fork::hook to re-set the alarm on the forked > process... > > Thanks!
I agree. Some documentation about interaction characteristics with forking, threads, and/or async I/O would be helpful for users. I accept pull requests :)
Implemented in 60c7f3b. Released 0.020. Thanks. On Sat, 27 Jan 2018 10:38:20 GMT, PERLANCAR wrote: Show quoted text
> On Fri, 26 Jan 2018 13:10:35 GMT, GORTAN wrote:
> > Thanks for your module Timeout::Self, which has proven really useful > > in our unittests to assure that the CI jobs get finished, even if > > some > > bug results in an endless loop. One thing we noticed however is that > > it doesn't play perfectly nice with programs that fork: While the > > alarm handler gets cloned to the child process by Perl, the alarm is > > not set again - so the child process will not time out. > > > > While this is of course not Timeout::Self's fault, it would be great > > if you could either document this fact in the POD, or decide to do > > something about it: one option is to use > > https://metacpan.org/pod/fork::hook to re-set the alarm on the forked > > process... > > > > Thanks!
> > I agree. Some documentation about interaction characteristics with > forking, threads, and/or async I/O would be helpful for users. I > accept pull requests :)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.