@lparList is tested with 1 and 2 elements. (elements can be 1 lpar or a , seperated list of lpars, stored in @LPARs of the thread) Both times the signal arrives, the code that has to be executed by the thread when the signal is received is executed. However, the last command (threads->exit() or the other options) are executed, but don't result in the end of the thread.

The 'do stuff' is a large block of code used to gather all info I need to send a command via ssh (Net::OpenSSH) to a server, which then stops the machine. After the command is issued, the script checks every 30 seconds if the system is already dead. When it's dead, it continues to the next entry of @LPARs (in the test 1 thread with 1 @LPARs element, 1 thread with 2 @LPARs elements)

The behaviour I see is that the timeout is reached, the signal ALRM is send to the 1st thread that's still running, it's acted upon (i.e. I get all expected output of the function triggered with the signal), including the call of return/die/threads->exit(), but it just simply doesn't die.


In reply to Re^2: Perl 5.8.8 threads, clean exit by T_I
in thread Perl 5.8.8 threads, clean exit by T_I

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.