Not sure if this is of any help (because on the Solaris 10 box I have within reach, there's only an older Perl installed), but just in case: the following works fine here

#!/usr/bin/perl our $sig; # same for my $sig $SIG{INT} = \&handler; sub handler { print "got SIGINT\n"; $sig++; } until ($sig) { print "running...\n"; sleep 1; } print "terminated.\n";

outputs as expected (until/when I send it SIGINT)

running... running... running... got SIGINT terminated.

Can you produce a backtrace, loading your core file in a debugger (gdb perl core, then, at the prompt, typing "bt" — in case you have gdb available, that is...)? This might give a first hint at where things are going wrong. (A perl binary built with debugging info would be better, of course...)

___

$ uname -a SunOS solaris10 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500 $ perl -v This is perl, v5.8.4 built for sun4-solaris-64int (with 27 registered patches, see perl -V for more detail) (...)

In reply to Re: Signal Handling throws Core Dump by almut
in thread Signal Handling throws Core Dump by dsb

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.