From: Craig A. Berry Date: Thu, 21 Jun 2001 18:20:38 +0000 (-0500) Subject: should POSIX.xs use XSRETURN_UNDEF in sigaction? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=15c0d34a91b8ea9e5d01452494af4b047eea15b1;p=p5sagit%2Fp5-mst-13.2.git should POSIX.xs use XSRETURN_UNDEF in sigaction? Message-Id: <5.1.0.14.0.20010621180227.02a8e930@exchi01> p4raw-id: //depot/perl@10816 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index e5e5f16..6f27ea3 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -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;