Monks,

I'm seeing IPC::Run spawn a child process which runs as expected, but when the child completes and exits, the parent doesn't notice until the timeout has completely elapsed. The child is listed as a zombi by ps(1). I run this:

$ time perl -MIPC::Run=run,timeout,timer -lwe 'run(["/bin/sleep", 5], +timeout(10));'
and get this:
0m11.129s (0.100u 0.000s)
11 seconds elapsed because the parent didn't cleanup the child process when it finished.

If I simply change the timeout to 3 seconds, I get the expected behavior of IPC::Run throwing an exception.

I've installed IPC::Run v0.80 with the CPAN shell, with a package I built myself and with a Fedora package I downloaded, as well as a Fedora v0.79 package I downloaded, all give the same result.

I've used IPC::Run before without this problem on the same architecture I have now and can't find the culprit.

Host: Linux kolsch.srv.office 2.6.9-55.0.2.EL.xs4.0.1.495xenU #1 SMP Mon Aug 13 09:19:16 EDT 2007 i686 i686 i386 GNU/Linux

OS: CentOS release 4.5 (Final)

Perl: 5.8.5


In reply to IPC::Run not seeing exit of short child run with long timeout by wildSmurf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.