delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/09/15/08:54:17

Date: Sun, 13 Sep 1998 15:15:08 +0200 (METDST)
Message-Id: <199809131315.PAA11345@tyr.diku.dk>
From: Morten Welinder <terra AT diku DOT dk>
To: eliz AT is DOT elta DOT co DOT il
CC: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.SUN.3.91.980913133058.22173a-100000@is> (message from Eli
Zaretskii on Sun, 13 Sep 1998 13:31:47 +0300 (IDT))
Subject: Re: `select' feature?
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980913133058 DOT 22173a-100000 AT is>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019