in reply to Signal Handling throws Core Dump
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) (...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Signal Handling throws Core Dump
by dsb (Chaplain) on Apr 25, 2007 at 16:43 UTC | |
by jettero (Monsignor) on Apr 25, 2007 at 16:57 UTC | |
by former33t (Scribe) on Apr 26, 2007 at 03:05 UTC | |
by jrw (Monk) on Apr 26, 2007 at 16:52 UTC | |
by dsb (Chaplain) on Apr 28, 2007 at 03:13 UTC |