From e06f8dfcdf1dbf8ac6d12075c5da9f94a894f6a9 Mon Sep 17 00:00:00 2001 From: "Ned T. Crigler" Date: Wed, 27 Sep 2006 23:08:22 +0000 Subject: [PATCH] Add a comment to the waitattach code. --- master.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/master.c b/master.c index a46782d..fb6159d 100644 --- a/master.c +++ b/master.c @@ -444,9 +444,16 @@ master_process(int s, char **argv, int waitattach) FD_SET(s, &readfds); highest_fd = s; - if (clients && clients->attached) - waitattach = 0; - if (!waitattach) + /* + ** When waitattach is set, wait until the client attaches + ** before trying to read from the pty. + */ + if (waitattach) + { + if (clients && clients->attached) + waitattach = 0; + } + else { FD_SET(the_pty.fd, &readfds); if (the_pty.fd > highest_fd)