summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2001-06-22 05:08:35 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-22 14:15:26 +0000
commit5c2d7af2a41ad0642e7ae40c61d42000f908a0e0 (patch)
tree59b90fdc23f48943594de39c915474168b0160a9 /vms/vms.c
parent9b8395f0a48909184dd92665527ed55efc765aa6 (diff)
downloadperl-5c2d7af2a41ad0642e7ae40c61d42000f908a0e0.tar.gz
sigaction workaround for VMS
Message-Id: <a05101001b75908704194@[192.168.56.145]> p4raw-id: //depot/perl@10827
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 406276d541..548d130cac 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -1064,6 +1064,27 @@ my_tmpfile(void)
}
/*}}}*/
+
+#ifndef HOMEGROWN_POSIX_SIGNALS
+/*
+ * The C RTL's sigaction fails to check for invalid signal numbers so we
+ * help it out a bit. The docs are correct, but the actual routine doesn't
+ * do what the docs say it will.
+ */
+/*{{{int Perl_my_sigaction (pTHX_ int, const struct sigaction*, struct sigaction*);*/
+int
+Perl_my_sigaction (pTHX_ int sig, const struct sigaction* act,
+ struct sigaction* oact)
+{
+ if (sig == SIGKILL || sig == SIGSTOP || sig == SIGCONT) {
+ SETERRNO(EINVAL, SS$_INVARG);
+ return -1;
+ }
+ return sigaction(sig, act, oact);
+}
+/*}}}*/
+#endif
+
/* default piping mailbox size */
#define PERL_BUFSIZ 512