From 15c0d34a91b8ea9e5d01452494af4b047eea15b1 Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Thu, 21 Jun 2001 13:20:38 -0500 Subject: [PATCH] should POSIX.xs use XSRETURN_UNDEF in sigaction? Message-Id: <5.1.0.14.0.20010621180227.02a8e930@exchi01> p4raw-id: //depot/perl@10816 --- ext/POSIX/POSIX.xs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index e5e5f164b5..6f27ea3165 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; -- 2.34.1