Date: Wed, 30 Apr 2003 07:50:22 -0700 (PDT) From: Dmitry Sivachenko <mitya@cavia.pp.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/49096: cron(8) may segfault when system open file table is full Message-ID: <200304301450.h3UEoMC8030365@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/49096; it has been noted by GNATS. From: Dmitry Sivachenko <mitya@cavia.pp.ru> To: freebsd-gnats-submit@FreeBSD.org Cc: eugen@grosbein.pp.ru Subject: Re: bin/49096: cron(8) may segfault when system open file table is full Date: Wed, 30 Apr 2003 18:45:33 +0400 Does the following patch fix the problem? --- do_command.c.orig Fri May 4 04:59:40 2001 +++ do_command.c Wed Apr 30 18:41:48 2003 @@ -369,13 +369,14 @@ child_process(e, u) /*local*/{ register FILE *in = fdopen(stdout_pipe[READ_PIPE], "r"); - register int ch = getc(in); + register int ch; if (in == NULL) { warn("fdopen failed in child"); _exit(ERROR_EXIT); } + ch = getc(in); if (ch != EOF) { register FILE *mail; register int bytes = 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304301450.h3UEoMC8030365>