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

Re: [PATCH ext/POSIX/POSIX.pm] Re: sigaction.t under QNX

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
July 5, 2001 19:16
Subject:
Re: [PATCH ext/POSIX/POSIX.pm] Re: sigaction.t under QNX
Message ID:
200107060215.f662FxY06533@smtp3.ActiveState.com
On Thu, 05 Jul 2001 13:34:51 EDT, Norton Allen wrote:
>exit 0
>=============
>
>  This patch addresses the fact that osset is used in a
>  saved destructor after the local C scope has expired.
>  I will gladly entertain a more elegant solution if it
>  is warranted.
>  
>     -Norton Allen
>
>*** ../ORIG/perl-11148/ext/POSIX/POSIX.xs	Mon Jul  2 09:00:31 2001
>--- perl-11148/ext/POSIX/POSIX.xs	Thu Jul  5 13:24:11 2001
>***************
>*** 1185,1191 ****
>  	    struct sigaction act;
>  	    struct sigaction oact;
>  	    sigset_t sset;
>! 	    sigset_t osset;
>  	    POSIX__SigSet sigset;
>  	    SV** svp;
>  	    SV** sigsvp = hv_fetch(GvHVn(siggv),
>--- 1185,1191 ----
>  	    struct sigaction act;
>  	    struct sigaction oact;
>  	    sigset_t sset;
>! 	    static sigset_t osset;

This is not thread-safe.  I suggest allocating the space for it on
the savestack, either via SSNEW() or using a newSVpv()+SAVEFREESV()
combo.


Sarathy
gsar@ActiveState.com

Thread Previous | 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