Add a comment to the waitattach code.

This commit is contained in:
Ned T. Crigler 2006-09-27 23:08:22 +00:00
parent 5f6d552d2c
commit e06f8dfcdf
1 changed files with 10 additions and 3 deletions

View File

@ -444,9 +444,16 @@ master_process(int s, char **argv, int waitattach)
FD_SET(s, &readfds); FD_SET(s, &readfds);
highest_fd = s; highest_fd = s;
if (clients && clients->attached) /*
waitattach = 0; ** When waitattach is set, wait until the client attaches
if (!waitattach) ** before trying to read from the pty.
*/
if (waitattach)
{
if (clients && clients->attached)
waitattach = 0;
}
else
{ {
FD_SET(the_pty.fd, &readfds); FD_SET(the_pty.fd, &readfds);
if (the_pty.fd > highest_fd) if (the_pty.fd > highest_fd)