should POSIX.xs use XSRETURN_UNDEF in sigaction?
Craig A. Berry [Thu, 21 Jun 2001 18:20:38 +0000 (13:20 -0500)]
Message-Id: <5.1.0.14.0.20010621180227.02a8e930@exchi01>

p4raw-id: //depot/perl@10816

ext/POSIX/POSIX.xs

index e5e5f16..6f27ea3 100644 (file)
@@ -1212,7 +1212,7 @@ sigaction(sig, optaction, oldaction = 0)
            sigfillset(&sset);
            RETVAL=sigprocmask(SIG_BLOCK, &sset, &osset);
            if(RETVAL == -1)
-               XSRETURN(1);
+               XSRETURN_UNDEF;
            ENTER;
            /* Restore signal mask no matter how we exit this block. */
            SAVEDESTRUCTOR(restore_sigmask, &osset);
@@ -1232,7 +1232,7 @@ sigaction(sig, optaction, oldaction = 0)
                }
                RETVAL = sigaction(sig, (struct sigaction *)0, & oact);
                if(RETVAL == -1)
-                   XSRETURN(1);
+                   XSRETURN_UNDEF;
                /* Get back the mask. */
                svp = hv_fetch(oldaction, "MASK", 4, TRUE);
                if (sv_isa(*svp, "POSIX::SigSet")) {
@@ -1294,6 +1294,8 @@ sigaction(sig, optaction, oldaction = 0)
                 * essentially meaningless anyway.
                 */
                RETVAL = sigaction(sig, & act, (struct sigaction *)0);
+               if(RETVAL == -1)
+                   XSRETURN_UNDEF;
            }
 
            LEAVE;