Add copyright
[unix-history] / usr / src / lib / libc / gen / siginterrupt.c
CommitLineData
6fa13af1
KM
1/* siginterrupt.c 4.1 85/03/11 */
2
3#include <signal.h>
4
5/*
6 * Set signal state to prevent restart of system calls
7 * after an instance of the indicated signal.
8 */
9siginterrupt(sig, flag)
10 int sig, flag;
11{
12 struct sigvec sv;
13 int ret;
14
15 if ((ret = sigvec(sig, 0, &sv)) < 0)
16 return (ret);
17 if (flag)
18 sv.sv_flags |= SV_INTERRUPT;
19 else
20 sv.sv_flags &= ~SV_INTERRUPT;
21 return (sigvec(sig, &sv, 0));
22}