Date: Sun, 13 Sep 1998 15:15:08 +0200 (METDST) Message-Id: <199809131315.PAA11345@tyr.diku.dk> From: Morten Welinder To: eliz AT is DOT elta DOT co DOT il CC: djgpp-workers AT delorie DOT com In-reply-to: (message from Eli Zaretskii on Sun, 13 Sep 1998 13:31:47 +0300 (IDT)) Subject: Re: `select' feature? References: Precedence: bulk Hmm, Linux' select(2) man page says "On error, -1 is returned, and errno is set appropriately; the sets and timeout become undefined, so do not rely on their contents after an error." Solaris 2.6 says "On failure, the objects pointed to by the readfs, writefs, and errorfds arguments are not modified. If the timeout interval expires without the specified condition being true for any of the specified file descriptors, the objects pointed to by the readfs, writefs, and errorfds arguments have all bits set to 0." HPUX 10 says it like Solaris. DJGPP's select(2) was written on the basis of whatever man pages I had available at that time. HPUX 9.x and OSF 2.x, I think. I had Emacs in my mind at the time. Based on the Linux manual page it looks like MC will have to check the return code from select(2). Your porter should have that fixed in the official source code. That does not keep ours from being incorrect, however, in the timeout case. that is considered a successful return and all bits should be cleared. Morten