projects
/
sudo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d18b458
)
Move check for maxfd == -1 to flush_output where it belongs.
author
Todd C. Miller
<Todd.Miller@courtesan.com>
Thu, 20 May 2010 21:34:53 +0000
(17:34 -0400)
committer
Todd C. Miller
<Todd.Miller@courtesan.com>
Thu, 20 May 2010 21:34:53 +0000
(17:34 -0400)
src/script.c
patch
|
blob
|
history
diff --git
a/src/script.c
b/src/script.c
index fd60afe279eb256161dc151777c8f79e6dbd5ee3..dd3baf2a2d15e5743c62660b6c8f97ca018bfa5b 100644
(file)
--- a/
src/script.c
+++ b/
src/script.c
@@
-1122,8
+1122,6
@@
script_child(const char *path, char *argv[], char *envp[], int backchannel, int
if (errpipe[0] != -1)
FD_SET(errpipe[0], fdsr);
maxfd = MAX(errpipe[0], backchannel);
- if (maxfd == -1)
- goto done;
if (recvsig[SIGCHLD])
continue;
@@
-1201,6
+1199,8
@@
flush_output(struct io_buffer *iobufs)
if (iob->wfd > maxfd)
maxfd = iob->wfd;
}
+ if (maxfd == -1)
+ return;
fdsr = (fd_set *)emalloc2(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));
fdsw = (fd_set *)emalloc2(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));