Thu Jan 3 12:42:41 2002 Michael Jennings (mej)

This is better.


SVN revision: 5805
This commit is contained in:
Michael Jennings 2002-01-03 17:44:39 +00:00
parent 890147b8ea
commit d5085e3001
2 changed files with 8 additions and 4 deletions

View File

@ -4460,3 +4460,7 @@ Thu Jan 3 12:38:54 2002 Michael Jennings (mej)
Fixed the select() call based on info from Paul W Brannan
<pbranna@clemson.edu>. Also added check for _POSIX_SAVED_IDS.
----------------------------------------------------------------------
Thu Jan 3 12:42:41 2002 Michael Jennings (mej)
This is better.
----------------------------------------------------------------------

View File

@ -2103,7 +2103,7 @@ run_command(char **argv)
privileges(IGNORE);
ptyfd = get_pty();
AT_LEAST(num_fds, ptyfd);
AT_LEAST(num_fds, ptyfd + 1);
if (ptyfd < 0)
return (-1);
@ -2287,9 +2287,9 @@ init_command(char **argv)
Xfd = XConnectionNumber(Xdisplay);
D_CMD(("Xfd = %d\n", Xfd));
cmdbuf_ptr = cmdbuf_endp = cmdbuf_base;
AT_LEAST(num_fds, Xfd);
AT_LEAST(num_fds, Xfd + 1);
if (pipe_fd >= 0) {
AT_LEAST(num_fds, pipe_fd);
AT_LEAST(num_fds, pipe_fd + 1);
}
if ((cmd_fd = run_command(argv)) < 0) {
@ -2528,7 +2528,7 @@ cmd_getc(void)
} else {
delay = &value;
}
retval = select(num_fds + 1, &readfds, NULL, NULL, delay);
retval = select(num_fds, &readfds, NULL, NULL, delay);
/* See if we can read from the application */
if (cmd_fd >= 0 && FD_ISSET(cmd_fd, &readfds)) {