version 1.16, 2001/02/04 21:27:01 |
version 1.17, 2001/11/17 19:51:34 |
|
|
outfile = outpath = toutpath; |
outfile = outpath = toutpath; |
} else if (!(ch = access(outpath, 0)) && |
} else if (!(ch = access(outpath, 0)) && |
strncmp(_PATH_DEV, outpath, 5)) { |
strncmp(_PATH_DEV, outpath, 5)) { |
struct sigaction act = {0, SIG_BLOCK, 6}; |
struct sigaction act; |
int sigtable[] = {SIGHUP, SIGINT, SIGPIPE, SIGXCPU, SIGXFSZ, |
int sigtable[] = {SIGHUP, SIGINT, SIGPIPE, SIGXCPU, SIGXFSZ, |
SIGVTALRM, SIGPROF, 0}; |
SIGVTALRM, SIGPROF, 0}; |
int outfd; |
int outfd; |
|
|
|
|
if (access(outpath, W_OK)) |
if (access(outpath, W_OK)) |
err(2, "%s", outpath); |
err(2, "%s", outpath); |
act.sa_handler = onsig; |
|
(void)snprintf(toutpath, sizeof(toutpath), "%sXXXXXXXXXX", |
(void)snprintf(toutpath, sizeof(toutpath), "%sXXXXXXXXXX", |
outpath); |
outpath); |
/* use default umask to try and avoid one syscall */ |
/* use default umask to try and avoid one syscall */ |
|
|
outfile = toutpath; |
outfile = toutpath; |
|
|
(void)atexit(cleanup); |
(void)atexit(cleanup); |
|
sigfillset(&act.sa_mask); |
|
act.sa_flags = SA_RESTART; |
|
act.sa_handler = onsig; |
for (i = 0; sigtable[i]; ++i) /* always unlink toutpath */ |
for (i = 0; sigtable[i]; ++i) /* always unlink toutpath */ |
sigaction(sigtable[i], &act, 0); |
sigaction(sigtable[i], &act, 0); |
} else |
} else |