Change 11191 by jhi@alpha on 2001/07/07 15:26:16

        Subject: Re: [PATCH ext/POSIX/POSIX.pm] Re: sigaction.t under QNX
        From: Norton Allen <[EMAIL PROTECTED]>
        Date: Fri, 6 Jul 2001 12:01:14 -0400 (edt)
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/ext/POSIX/POSIX.xs#94 edit

Differences ...

==== //depot/perl/ext/POSIX/POSIX.xs#94 (text) ====
Index: perl/ext/POSIX/POSIX.xs
--- perl/ext/POSIX/POSIX.xs.~1~ Sat Jul  7 09:30:06 2001
+++ perl/ext/POSIX/POSIX.xs     Sat Jul  7 09:30:06 2001
@@ -522,13 +522,14 @@
 }
 
 static void
-restore_sigmask(sigset_t *ossetp)
+restore_sigmask(SV *osset_sv)
 {
            /* Fortunately, restoring the signal mask can't fail, because
             * there's nothing we can do about it if it does -- we're not
             * supposed to return -1 from sigaction unless the disposition
             * was unaffected.
             */
+           sigset_t *ossetp = (sigset_t *) SvPV_nolen( osset_sv );
            (void)sigprocmask(SIG_SETMASK, ossetp, (sigset_t *)0);
 }
 
@@ -1185,6 +1186,7 @@
            struct sigaction act;
            struct sigaction oact;
            sigset_t sset;
+           SV *osset_sv;
            sigset_t osset;
            POSIX__SigSet sigset;
            SV** svp;
@@ -1215,7 +1217,9 @@
                XSRETURN_UNDEF;
            ENTER;
            /* Restore signal mask no matter how we exit this block. */
-           SAVEDESTRUCTOR(restore_sigmask, &osset);
+           osset_sv = newSVpv((char *)(&osset), sizeof(sigset_t));
+           SAVEFREESV( osset_sv );
+           SAVEDESTRUCTOR(restore_sigmask, osset_sv);
 
            RETVAL=-1; /* In case both oldaction and action are 0. */
 
End of Patch.

Reply via email to