mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Fix a coredump that would occur when fdopen was unable to
return a valid fd. PR: 49096 Submitted by: demon MFC after: 3 days
This commit is contained in:
parent
d4c737a952
commit
9be756b54b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116590
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue