Well, thanks for your comments, however...

hacker
  • Your 'tutorial' link is broken (fixed) points to the perlipc pod, which i mentioned i've already read.
  • I've seen the faq, and done what it said, read perlipc & ch 16 of the camel (which says pretty much the same thing), as well as ch16 of the perl cookbook.
  • I'm not trying to trap signals with eval (?!?), and my code already uses $SIG{ALRM} = sub{ die } ...

    Zaxo
  • I fail to see the different moving waitpid() makes, apart from style. Mine is still executed by the parent (the code was tested before posting and works).
  • I'll need to create a signal handler of some sort, wont i? I tried changing the %SIG sub to { kill INT => $pid } but the child doesn't die...

    I've read all i can get my hand's on (albiet not in depth), and have a general understanding of how everything works. All i'm after is how to, in effect, timeout system() and qx() calls safely, and capture output...

    Update:
    I urge you to reflect on why you asked the question.
    Ok... <reflects> Because: i'm not sure 1) where/if/how to use kill, 2) wether or not i'm creating zombies, and 3) how to capture output.
    The code was working, but you didn't know why.
    No, i researched and wrote it myself, i'm just not sure about the zombie bit.
    You reject advice on saving time and worry every time you need this kind of code.
    Sorry, now you've lost me...

    - ><iper


    my JAPH: print"Just another Perl hacker\n"; # ^ look, no space! pretty tricky hey?

    In reply to Re: Re: The 'ol shell timeout question by xiper
    in thread The 'ol shell timeout question by xiper

    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.