diff options
| author | Guy Helmer <ghelmer@FreeBSD.org> | 2000-05-23 13:46:04 +0000 |
|---|---|---|
| committer | Guy Helmer <ghelmer@FreeBSD.org> | 2000-05-23 13:46:04 +0000 |
| commit | 64ae78cb9d383926ef94c485ba57c001c7a2b3d5 (patch) | |
| tree | a19a678976aae2ab6a5b18ec4ef247376dc7d9cd /usr.sbin/cron | |
| parent | 5c7cba96bc453f3856789f8a50b94807c7d04b3f (diff) | |
Notes
Diffstat (limited to 'usr.sbin/cron')
| -rw-r--r-- | usr.sbin/cron/cron/do_command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c index e674563c610a..4bac47ebc4dc 100644 --- a/usr.sbin/cron/cron/do_command.c +++ b/usr.sbin/cron/cron/do_command.c @@ -309,6 +309,11 @@ child_process(e, u) register int escaped = FALSE; register int ch; + if (out == NULL) { + warn("fdopen failed in child2"); + _exit(ERROR_EXIT); + } + Debug(DPROC, ("[%d] child2 sending data to grandchild\n", getpid())) /* close the pipe we don't use, since we inherited it and @@ -369,6 +374,11 @@ child_process(e, u) register FILE *in = fdopen(stdout_pipe[READ_PIPE], "r"); register int ch = getc(in); + if (in == NULL) { + warn("fdopen failed in child"); + _exit(ERROR_EXIT); + } + if (ch != EOF) { register FILE *mail; register int bytes = 1; |
