in reply to Re^3: Exiting a script with an 'infinitely looping' thread
in thread Exiting a script with an 'infinitely looping' thread
#!/usr/bin/perl -w
use threads;
$SIG{"INT"}=\&sigInt;
my $thread=threads->create('test')->detach();
while(1) { sleep 100; }
sub test { sleep 100; }
sub sigInt { exit; }
-mark
|
|---|