17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
37c478bd9Sstevel@tonic-gate * All rights reserved.
47c478bd9Sstevel@tonic-gate *
57c478bd9Sstevel@tonic-gate * By using this file, you agree to the terms and conditions set
67c478bd9Sstevel@tonic-gate * forth in the LICENSE file which can be found at the top level of
77c478bd9Sstevel@tonic-gate * the sendmail distribution.
87c478bd9Sstevel@tonic-gate */
97c478bd9Sstevel@tonic-gate
107c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
117c478bd9Sstevel@tonic-gate
127c478bd9Sstevel@tonic-gate #include <sm/gen.h>
13*49218d4fSjbeck SM_RCSID("@(#)$Id: signal.c,v 1.17 2005/06/14 23:07:20 ca Exp $")
147c478bd9Sstevel@tonic-gate
157c478bd9Sstevel@tonic-gate #if SM_CONF_SETITIMER
16*49218d4fSjbeck # include <sm/time.h>
177c478bd9Sstevel@tonic-gate #endif /* SM_CONF_SETITIMER */
187c478bd9Sstevel@tonic-gate #include <errno.h>
197c478bd9Sstevel@tonic-gate #include <stdlib.h>
207c478bd9Sstevel@tonic-gate #include <time.h>
217c478bd9Sstevel@tonic-gate #include <unistd.h>
227c478bd9Sstevel@tonic-gate #include <sm/clock.h>
237c478bd9Sstevel@tonic-gate #include <sm/signal.h>
247c478bd9Sstevel@tonic-gate #include <signal.h>
257c478bd9Sstevel@tonic-gate #include <sm/string.h>
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate unsigned int volatile InCriticalSection; /* >0 if inside critical section */
287c478bd9Sstevel@tonic-gate int volatile PendingSignal; /* pending signal to resend */
297c478bd9Sstevel@tonic-gate
30*49218d4fSjbeck /*
317c478bd9Sstevel@tonic-gate ** SM_SIGNAL -- set a signal handler
327c478bd9Sstevel@tonic-gate **
337c478bd9Sstevel@tonic-gate ** This is essentially old BSD "signal(3)".
347c478bd9Sstevel@tonic-gate **
357c478bd9Sstevel@tonic-gate ** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
367c478bd9Sstevel@tonic-gate ** ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE
377c478bd9Sstevel@tonic-gate ** DOING.
387c478bd9Sstevel@tonic-gate */
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate sigfunc_t
sm_signal(sig,handler)417c478bd9Sstevel@tonic-gate sm_signal(sig, handler)
427c478bd9Sstevel@tonic-gate int sig;
437c478bd9Sstevel@tonic-gate sigfunc_t handler;
447c478bd9Sstevel@tonic-gate {
457c478bd9Sstevel@tonic-gate # if defined(SA_RESTART) || (!defined(SYS5SIGNALS) && !defined(BSD4_3))
467c478bd9Sstevel@tonic-gate struct sigaction n, o;
477c478bd9Sstevel@tonic-gate # endif /* defined(SA_RESTART) || (!defined(SYS5SIGNALS) && !defined(BSD4_3)) */
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate /*
507c478bd9Sstevel@tonic-gate ** First, try for modern signal calls
517c478bd9Sstevel@tonic-gate ** and restartable syscalls
527c478bd9Sstevel@tonic-gate */
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate # ifdef SA_RESTART
557c478bd9Sstevel@tonic-gate (void) memset(&n, '\0', sizeof n);
567c478bd9Sstevel@tonic-gate # if USE_SA_SIGACTION
577c478bd9Sstevel@tonic-gate n.sa_sigaction = (void(*)(int, siginfo_t *, void *)) handler;
587c478bd9Sstevel@tonic-gate n.sa_flags = SA_RESTART|SA_SIGINFO;
597c478bd9Sstevel@tonic-gate # else /* USE_SA_SIGACTION */
607c478bd9Sstevel@tonic-gate n.sa_handler = handler;
617c478bd9Sstevel@tonic-gate n.sa_flags = SA_RESTART;
627c478bd9Sstevel@tonic-gate # endif /* USE_SA_SIGACTION */
637c478bd9Sstevel@tonic-gate if (sigaction(sig, &n, &o) < 0)
647c478bd9Sstevel@tonic-gate return SIG_ERR;
657c478bd9Sstevel@tonic-gate return o.sa_handler;
667c478bd9Sstevel@tonic-gate # else /* SA_RESTART */
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate /*
697c478bd9Sstevel@tonic-gate ** Else check for SYS5SIGNALS or
707c478bd9Sstevel@tonic-gate ** BSD4_3 signals
717c478bd9Sstevel@tonic-gate */
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate # if defined(SYS5SIGNALS) || defined(BSD4_3)
747c478bd9Sstevel@tonic-gate # ifdef BSD4_3
757c478bd9Sstevel@tonic-gate return signal(sig, handler);
767c478bd9Sstevel@tonic-gate # else /* BSD4_3 */
777c478bd9Sstevel@tonic-gate return sigset(sig, handler);
787c478bd9Sstevel@tonic-gate # endif /* BSD4_3 */
797c478bd9Sstevel@tonic-gate # else /* defined(SYS5SIGNALS) || defined(BSD4_3) */
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gate /*
827c478bd9Sstevel@tonic-gate ** Finally, if nothing else is available,
837c478bd9Sstevel@tonic-gate ** go for a default
847c478bd9Sstevel@tonic-gate */
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate (void) memset(&n, '\0', sizeof n);
877c478bd9Sstevel@tonic-gate n.sa_handler = handler;
887c478bd9Sstevel@tonic-gate if (sigaction(sig, &n, &o) < 0)
897c478bd9Sstevel@tonic-gate return SIG_ERR;
907c478bd9Sstevel@tonic-gate return o.sa_handler;
917c478bd9Sstevel@tonic-gate # endif /* defined(SYS5SIGNALS) || defined(BSD4_3) */
927c478bd9Sstevel@tonic-gate # endif /* SA_RESTART */
937c478bd9Sstevel@tonic-gate }
94*49218d4fSjbeck /*
957c478bd9Sstevel@tonic-gate ** SM_BLOCKSIGNAL -- hold a signal to prevent delivery
967c478bd9Sstevel@tonic-gate **
977c478bd9Sstevel@tonic-gate ** Parameters:
987c478bd9Sstevel@tonic-gate ** sig -- the signal to block.
997c478bd9Sstevel@tonic-gate **
1007c478bd9Sstevel@tonic-gate ** Returns:
1017c478bd9Sstevel@tonic-gate ** 1 signal was previously blocked
1027c478bd9Sstevel@tonic-gate ** 0 signal was not previously blocked
1037c478bd9Sstevel@tonic-gate ** -1 on failure.
1047c478bd9Sstevel@tonic-gate */
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate int
sm_blocksignal(sig)1077c478bd9Sstevel@tonic-gate sm_blocksignal(sig)
1087c478bd9Sstevel@tonic-gate int sig;
1097c478bd9Sstevel@tonic-gate {
1107c478bd9Sstevel@tonic-gate # ifdef BSD4_3
1117c478bd9Sstevel@tonic-gate # ifndef sigmask
1127c478bd9Sstevel@tonic-gate # define sigmask(s) (1 << ((s) - 1))
1137c478bd9Sstevel@tonic-gate # endif /* ! sigmask */
1147c478bd9Sstevel@tonic-gate return (sigblock(sigmask(sig)) & sigmask(sig)) != 0;
1157c478bd9Sstevel@tonic-gate # else /* BSD4_3 */
1167c478bd9Sstevel@tonic-gate # ifdef ALTOS_SYSTEM_V
1177c478bd9Sstevel@tonic-gate sigfunc_t handler;
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gate handler = sigset(sig, SIG_HOLD);
1207c478bd9Sstevel@tonic-gate if (handler == SIG_ERR)
1217c478bd9Sstevel@tonic-gate return -1;
1227c478bd9Sstevel@tonic-gate else
1237c478bd9Sstevel@tonic-gate return handler == SIG_HOLD;
1247c478bd9Sstevel@tonic-gate # else /* ALTOS_SYSTEM_V */
1257c478bd9Sstevel@tonic-gate sigset_t sset, oset;
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate (void) sigemptyset(&sset);
1287c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, sig);
1297c478bd9Sstevel@tonic-gate if (sigprocmask(SIG_BLOCK, &sset, &oset) < 0)
1307c478bd9Sstevel@tonic-gate return -1;
1317c478bd9Sstevel@tonic-gate else
1327c478bd9Sstevel@tonic-gate return sigismember(&oset, sig);
1337c478bd9Sstevel@tonic-gate # endif /* ALTOS_SYSTEM_V */
1347c478bd9Sstevel@tonic-gate # endif /* BSD4_3 */
1357c478bd9Sstevel@tonic-gate }
136*49218d4fSjbeck /*
1377c478bd9Sstevel@tonic-gate ** SM_RELEASESIGNAL -- release a held signal
1387c478bd9Sstevel@tonic-gate **
1397c478bd9Sstevel@tonic-gate ** Parameters:
1407c478bd9Sstevel@tonic-gate ** sig -- the signal to release.
1417c478bd9Sstevel@tonic-gate **
1427c478bd9Sstevel@tonic-gate ** Returns:
1437c478bd9Sstevel@tonic-gate ** 1 signal was previously blocked
1447c478bd9Sstevel@tonic-gate ** 0 signal was not previously blocked
1457c478bd9Sstevel@tonic-gate ** -1 on failure.
1467c478bd9Sstevel@tonic-gate */
1477c478bd9Sstevel@tonic-gate
1487c478bd9Sstevel@tonic-gate int
sm_releasesignal(sig)1497c478bd9Sstevel@tonic-gate sm_releasesignal(sig)
1507c478bd9Sstevel@tonic-gate int sig;
1517c478bd9Sstevel@tonic-gate {
1527c478bd9Sstevel@tonic-gate # ifdef BSD4_3
1537c478bd9Sstevel@tonic-gate return (sigsetmask(sigblock(0) & ~sigmask(sig)) & sigmask(sig)) != 0;
1547c478bd9Sstevel@tonic-gate # else /* BSD4_3 */
1557c478bd9Sstevel@tonic-gate # ifdef ALTOS_SYSTEM_V
1567c478bd9Sstevel@tonic-gate sigfunc_t handler;
1577c478bd9Sstevel@tonic-gate
1587c478bd9Sstevel@tonic-gate handler = sigset(sig, SIG_HOLD);
1597c478bd9Sstevel@tonic-gate if (sigrelse(sig) < 0)
1607c478bd9Sstevel@tonic-gate return -1;
1617c478bd9Sstevel@tonic-gate else
1627c478bd9Sstevel@tonic-gate return handler == SIG_HOLD;
1637c478bd9Sstevel@tonic-gate # else /* ALTOS_SYSTEM_V */
1647c478bd9Sstevel@tonic-gate sigset_t sset, oset;
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gate (void) sigemptyset(&sset);
1677c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, sig);
1687c478bd9Sstevel@tonic-gate if (sigprocmask(SIG_UNBLOCK, &sset, &oset) < 0)
1697c478bd9Sstevel@tonic-gate return -1;
1707c478bd9Sstevel@tonic-gate else
1717c478bd9Sstevel@tonic-gate return sigismember(&oset, sig);
1727c478bd9Sstevel@tonic-gate # endif /* ALTOS_SYSTEM_V */
1737c478bd9Sstevel@tonic-gate # endif /* BSD4_3 */
1747c478bd9Sstevel@tonic-gate }
175*49218d4fSjbeck /*
1767c478bd9Sstevel@tonic-gate ** PEND_SIGNAL -- Add a signal to the pending signal list
1777c478bd9Sstevel@tonic-gate **
1787c478bd9Sstevel@tonic-gate ** Parameters:
1797c478bd9Sstevel@tonic-gate ** sig -- signal to add
1807c478bd9Sstevel@tonic-gate **
1817c478bd9Sstevel@tonic-gate ** Returns:
1827c478bd9Sstevel@tonic-gate ** none.
1837c478bd9Sstevel@tonic-gate **
1847c478bd9Sstevel@tonic-gate ** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
1857c478bd9Sstevel@tonic-gate ** ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE
1867c478bd9Sstevel@tonic-gate ** DOING.
1877c478bd9Sstevel@tonic-gate */
1887c478bd9Sstevel@tonic-gate
1897c478bd9Sstevel@tonic-gate void
pend_signal(sig)1907c478bd9Sstevel@tonic-gate pend_signal(sig)
1917c478bd9Sstevel@tonic-gate int sig;
1927c478bd9Sstevel@tonic-gate {
1937c478bd9Sstevel@tonic-gate int sigbit;
1947c478bd9Sstevel@tonic-gate int save_errno = errno;
1957c478bd9Sstevel@tonic-gate #if SM_CONF_SETITIMER
1967c478bd9Sstevel@tonic-gate struct itimerval clr;
1977c478bd9Sstevel@tonic-gate #endif /* SM_CONF_SETITIMER */
1987c478bd9Sstevel@tonic-gate
1997c478bd9Sstevel@tonic-gate /*
2007c478bd9Sstevel@tonic-gate ** Don't want to interrupt something critical, hence delay
2017c478bd9Sstevel@tonic-gate ** the alarm for one second. Hopefully, by then we
2027c478bd9Sstevel@tonic-gate ** will be out of the critical section. If not, then
2037c478bd9Sstevel@tonic-gate ** we will just delay again. The events to be run will
2047c478bd9Sstevel@tonic-gate ** still all be run, maybe just a little bit late.
2057c478bd9Sstevel@tonic-gate */
2067c478bd9Sstevel@tonic-gate
2077c478bd9Sstevel@tonic-gate switch (sig)
2087c478bd9Sstevel@tonic-gate {
2097c478bd9Sstevel@tonic-gate case SIGHUP:
2107c478bd9Sstevel@tonic-gate sigbit = PEND_SIGHUP;
2117c478bd9Sstevel@tonic-gate break;
2127c478bd9Sstevel@tonic-gate
2137c478bd9Sstevel@tonic-gate case SIGINT:
2147c478bd9Sstevel@tonic-gate sigbit = PEND_SIGINT;
2157c478bd9Sstevel@tonic-gate break;
2167c478bd9Sstevel@tonic-gate
2177c478bd9Sstevel@tonic-gate case SIGTERM:
2187c478bd9Sstevel@tonic-gate sigbit = PEND_SIGTERM;
2197c478bd9Sstevel@tonic-gate break;
2207c478bd9Sstevel@tonic-gate
2217c478bd9Sstevel@tonic-gate case SIGUSR1:
2227c478bd9Sstevel@tonic-gate sigbit = PEND_SIGUSR1;
2237c478bd9Sstevel@tonic-gate break;
2247c478bd9Sstevel@tonic-gate
2257c478bd9Sstevel@tonic-gate case SIGALRM:
2267c478bd9Sstevel@tonic-gate /* don't have to pend these */
2277c478bd9Sstevel@tonic-gate sigbit = 0;
2287c478bd9Sstevel@tonic-gate break;
2297c478bd9Sstevel@tonic-gate
2307c478bd9Sstevel@tonic-gate default:
2317c478bd9Sstevel@tonic-gate /* If we get here, we are in trouble */
2327c478bd9Sstevel@tonic-gate abort();
2337c478bd9Sstevel@tonic-gate
2347c478bd9Sstevel@tonic-gate /* NOTREACHED */
2357c478bd9Sstevel@tonic-gate /* shut up stupid compiler warning on HP-UX 11 */
2367c478bd9Sstevel@tonic-gate sigbit = 0;
2377c478bd9Sstevel@tonic-gate break;
2387c478bd9Sstevel@tonic-gate }
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate if (sigbit != 0)
2417c478bd9Sstevel@tonic-gate PendingSignal |= sigbit;
2427c478bd9Sstevel@tonic-gate (void) sm_signal(SIGALRM, sm_tick);
2437c478bd9Sstevel@tonic-gate #if SM_CONF_SETITIMER
2447c478bd9Sstevel@tonic-gate clr.it_interval.tv_sec = 0;
2457c478bd9Sstevel@tonic-gate clr.it_interval.tv_usec = 0;
2467c478bd9Sstevel@tonic-gate clr.it_value.tv_sec = 1;
2477c478bd9Sstevel@tonic-gate clr.it_value.tv_usec = 0;
2487c478bd9Sstevel@tonic-gate (void) setitimer(ITIMER_REAL, &clr, NULL);
2497c478bd9Sstevel@tonic-gate #else /* SM_CONF_SETITIMER */
2507c478bd9Sstevel@tonic-gate (void) alarm(1);
2517c478bd9Sstevel@tonic-gate #endif /* SM_CONF_SETITIMER */
2527c478bd9Sstevel@tonic-gate errno = save_errno;
2537c478bd9Sstevel@tonic-gate }
254*49218d4fSjbeck /*
2557c478bd9Sstevel@tonic-gate ** SM_ALLSIGNALS -- act on all signals
2567c478bd9Sstevel@tonic-gate **
2577c478bd9Sstevel@tonic-gate ** Parameters:
2587c478bd9Sstevel@tonic-gate ** block -- whether to block or release all signals.
2597c478bd9Sstevel@tonic-gate **
2607c478bd9Sstevel@tonic-gate ** Returns:
2617c478bd9Sstevel@tonic-gate ** none.
2627c478bd9Sstevel@tonic-gate */
2637c478bd9Sstevel@tonic-gate
2647c478bd9Sstevel@tonic-gate void
sm_allsignals(block)2657c478bd9Sstevel@tonic-gate sm_allsignals(block)
2667c478bd9Sstevel@tonic-gate bool block;
2677c478bd9Sstevel@tonic-gate {
2687c478bd9Sstevel@tonic-gate # ifdef BSD4_3
2697c478bd9Sstevel@tonic-gate # ifndef sigmask
2707c478bd9Sstevel@tonic-gate # define sigmask(s) (1 << ((s) - 1))
2717c478bd9Sstevel@tonic-gate # endif /* ! sigmask */
2727c478bd9Sstevel@tonic-gate if (block)
2737c478bd9Sstevel@tonic-gate {
2747c478bd9Sstevel@tonic-gate int mask = 0;
2757c478bd9Sstevel@tonic-gate
2767c478bd9Sstevel@tonic-gate mask |= sigmask(SIGALRM);
2777c478bd9Sstevel@tonic-gate mask |= sigmask(SIGCHLD);
2787c478bd9Sstevel@tonic-gate mask |= sigmask(SIGHUP);
2797c478bd9Sstevel@tonic-gate mask |= sigmask(SIGINT);
2807c478bd9Sstevel@tonic-gate mask |= sigmask(SIGTERM);
2817c478bd9Sstevel@tonic-gate mask |= sigmask(SIGUSR1);
2827c478bd9Sstevel@tonic-gate
2837c478bd9Sstevel@tonic-gate (void) sigblock(mask);
2847c478bd9Sstevel@tonic-gate }
2857c478bd9Sstevel@tonic-gate else
2867c478bd9Sstevel@tonic-gate sigsetmask(0);
2877c478bd9Sstevel@tonic-gate # else /* BSD4_3 */
2887c478bd9Sstevel@tonic-gate # ifdef ALTOS_SYSTEM_V
2897c478bd9Sstevel@tonic-gate if (block)
2907c478bd9Sstevel@tonic-gate {
2917c478bd9Sstevel@tonic-gate (void) sigset(SIGALRM, SIG_HOLD);
2927c478bd9Sstevel@tonic-gate (void) sigset(SIGCHLD, SIG_HOLD);
2937c478bd9Sstevel@tonic-gate (void) sigset(SIGHUP, SIG_HOLD);
2947c478bd9Sstevel@tonic-gate (void) sigset(SIGINT, SIG_HOLD);
2957c478bd9Sstevel@tonic-gate (void) sigset(SIGTERM, SIG_HOLD);
2967c478bd9Sstevel@tonic-gate (void) sigset(SIGUSR1, SIG_HOLD);
2977c478bd9Sstevel@tonic-gate }
2987c478bd9Sstevel@tonic-gate else
2997c478bd9Sstevel@tonic-gate {
3007c478bd9Sstevel@tonic-gate (void) sigset(SIGALRM, SIG_DFL);
3017c478bd9Sstevel@tonic-gate (void) sigset(SIGCHLD, SIG_DFL);
3027c478bd9Sstevel@tonic-gate (void) sigset(SIGHUP, SIG_DFL);
3037c478bd9Sstevel@tonic-gate (void) sigset(SIGINT, SIG_DFL);
3047c478bd9Sstevel@tonic-gate (void) sigset(SIGTERM, SIG_DFL);
3057c478bd9Sstevel@tonic-gate (void) sigset(SIGUSR1, SIG_DFL);
3067c478bd9Sstevel@tonic-gate }
3077c478bd9Sstevel@tonic-gate # else /* ALTOS_SYSTEM_V */
3087c478bd9Sstevel@tonic-gate sigset_t sset;
3097c478bd9Sstevel@tonic-gate
3107c478bd9Sstevel@tonic-gate (void) sigemptyset(&sset);
3117c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, SIGALRM);
3127c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, SIGCHLD);
3137c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, SIGHUP);
3147c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, SIGINT);
3157c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, SIGTERM);
3167c478bd9Sstevel@tonic-gate (void) sigaddset(&sset, SIGUSR1);
3177c478bd9Sstevel@tonic-gate (void) sigprocmask(block ? SIG_BLOCK : SIG_UNBLOCK, &sset, NULL);
3187c478bd9Sstevel@tonic-gate # endif /* ALTOS_SYSTEM_V */
3197c478bd9Sstevel@tonic-gate # endif /* BSD4_3 */
3207c478bd9Sstevel@tonic-gate }
321*49218d4fSjbeck /*
3227c478bd9Sstevel@tonic-gate ** SM_SIGNAL_NOOP -- A signal no-op function
3237c478bd9Sstevel@tonic-gate **
3247c478bd9Sstevel@tonic-gate ** Parameters:
3257c478bd9Sstevel@tonic-gate ** sig -- signal received
3267c478bd9Sstevel@tonic-gate **
3277c478bd9Sstevel@tonic-gate ** Returns:
3287c478bd9Sstevel@tonic-gate ** SIGFUNC_RETURN
3297c478bd9Sstevel@tonic-gate */
3307c478bd9Sstevel@tonic-gate
3317c478bd9Sstevel@tonic-gate /* ARGSUSED */
3327c478bd9Sstevel@tonic-gate SIGFUNC_DECL
sm_signal_noop(sig)3337c478bd9Sstevel@tonic-gate sm_signal_noop(sig)
3347c478bd9Sstevel@tonic-gate int sig;
3357c478bd9Sstevel@tonic-gate {
3367c478bd9Sstevel@tonic-gate int save_errno = errno;
3377c478bd9Sstevel@tonic-gate
3387c478bd9Sstevel@tonic-gate FIX_SYSV_SIGNAL(sig, sm_signal_noop);
3397c478bd9Sstevel@tonic-gate errno = save_errno;
3407c478bd9Sstevel@tonic-gate return SIGFUNC_RETURN;
3417c478bd9Sstevel@tonic-gate }
3427c478bd9Sstevel@tonic-gate
343