At this script i get this response:

Scalars leaked: 1
USR1 ALRM
2
2
thread failed to start: Usage: Thread::Signal::_threadpid() at ./test line 13.


#!/usr/bin/perl


use threads;
use Thread::Signal;
use threads::shared;



sub bubu        {       
                @tid = Thread::Signal->tids( 'ALRM' );
                print "@tid\n";
                $x   = Thread::Signal->_threadpid($tid[0]);
                print "$x\n";
                }


Thread::Signal->register;
Thread::Signal->automatic(qw(ALRM USR1));
@automatic = Thread::Signal->automatic;

print "@automatic\n";
$thr    =       threads->new(\&bubu);
$threadtid      =       $thr->tid();
print "$threadtid\n";

$thr->join();

Reply via email to