Break out of select loop if all the fds we want to select on are -1.
This commit is contained in:
@@ -1122,6 +1122,8 @@ script_child(const char *path, char *argv[], char *envp[], int backchannel, int
|
|||||||
if (errpipe[0] != -1)
|
if (errpipe[0] != -1)
|
||||||
FD_SET(errpipe[0], fdsr);
|
FD_SET(errpipe[0], fdsr);
|
||||||
maxfd = MAX(errpipe[0], backchannel);
|
maxfd = MAX(errpipe[0], backchannel);
|
||||||
|
if (maxfd == -1)
|
||||||
|
goto done;
|
||||||
|
|
||||||
if (recvsig[SIGCHLD])
|
if (recvsig[SIGCHLD])
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user