version 1.37, 2009/10/27 23:59:43 |
version 1.38, 2009/10/28 20:41:39 |
|
|
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; |
struct sigaction oact, 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; |
|
|
act.sa_flags = SA_RESTART; |
act.sa_flags = SA_RESTART; |
act.sa_handler = onsig; |
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); |
if (sigaction(sigtable[i], NULL, &oact) < 0 || |
|
oact.sa_handler != SIG_IGN && |
|
sigaction(sigtable[i], &act, NULL) < 0) |
|
err(2, "sigaction"); |
} else |
} else |
outfile = outpath; |
outfile = outpath; |
if (outfp == NULL && (outfp = fopen(outfile, "w")) == NULL) |
if (outfp == NULL && (outfp = fopen(outfile, "w")) == NULL) |