diff options
author | Michael Jennings <mej@kainx.org> | 2002-01-03 17:44:39 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2002-01-03 17:44:39 +0000 |
commit | d5085e3001b0ffc99214af7f127e62d843a87b00 (patch) | |
tree | be22ab6b8c49cbcb5313b521a07b19eb992ae280 /src/command.c | |
parent | 890147b8ea9c81303bcd55e2f7f8b974d0060fdf (diff) | |
download | eterm-d5085e3001b0ffc99214af7f127e62d843a87b00.tar.gz |
Thu Jan 3 12:42:41 2002 Michael Jennings (mej)
This is better.
SVN revision: 5805
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command.c b/src/command.c index 4a59cb8..2029207 100644 --- a/src/command.c +++ b/src/command.c @@ -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)) { |