I can confirm that your example above works for me here on my local machine as well (Fedora 12). Here's some more info about my setup:

The top-level program sets its own process group (0) and invokes setsid so that it can take down all subprocesses if and when an INT is received. Depending on the code being run, it makes use of backticks, system() and fork(), so there will always be some sort of process tree at any given moment. Other than setting the signal handler I mentioned above, there is no other signal modification anywhere in the code.

Here is an example. The top-level program is called client.pl. Here is the output of pstree -p:

bash(1274)---client.pl(16775)---client.pl(7703)---sh(7704)---binary_release_12(7705)

In this case, the code has forked itself and invoked an external binary. The terminal in which process 16775 was launched doesn't respond to a Ctrl-C since that process exec()d itself about 20 mins ago.

If you guys have any other ideas of what could be fouling me up, let me know.

Thanks in advance for the help!


In reply to Re^2: signal handling in exec()'d code by jliv
in thread signal handling in exec()'d code by jliv

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.