develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [ID 20010828.006] problem with sigaction

Thread Next
From:
esp5
Date:
August 28, 2001 22:08
Subject:
Re: [ID 20010828.006] problem with sigaction
Message ID:
200108290358.UAA14306@rama.comp.pge.com
> Does this help?
> 
> - ams
> 
> --- ext/POSIX/POSIX.xs~ Tue Apr 24 00:53:22 2001
> +++ ext/POSIX/POSIX.xs  Tue Apr 24 02:26:18 2001
> @@ -3410,7 +3410,7 @@     
>                svp = hv_fetch(action, "HANDLER", 7, FALSE);     
>                if (!svp)
>                    croak("Can't supply an action without a HANDLER");
>-               sv_setpv(*sigsvp, SvPV(*svp, n_a));
>+               sv_setsv(*sigsvp, *svp);
>                mg_set(*sigsvp);        /* handles DEFAULT and 

Ok, that does help in the first case (ie: now the action is actually done.


*however* It doesn't help with the following script: 

use POSIX ':signal_h';

	sigaction SIGALRM, new POSIX::SigAction sub { print STDERR "alarmed"; };

	alarm(10);

	system("ftp earth.he.net");
	print STDERR "AM I HERE!!!\n";

This simply prints out alarmed and continues to wait for user input to ftp.
As per the manual, it should kill the child ftp process. and print "AM I HERE",
and then exit (note, no 'die' is in the alarm handler).

Ed

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About