[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] [ANNOUNCE] First Leafnode-2.0 beta version
tmcd@xxxxxxxx (Timothy A. McDaniel) writes:
> Matthias Andree <ma@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > I haven't yet looked where timeouts are handled, but I can surely
> > provide a solution that's based on select. It will be more
> > portable, nicer, but require to rework leafnode to use UNIX-level
> > I/O, not ANSI-level I/O. ...
> I only barely looked at select() some years in the past, but I dimly
> recall complaints that the arguments and semantics of select() varied
> from UNIX to UNIX. Have the variants been unified so that select() is
> portable now?
The timeout semantics differ, SysV and Linux change the timeval
structure to return the remaining time, BSD does not.
select() ist standardized in the Single Unix Specification v2.
> Are there any systems that leafnode is supposed to work on that might
> have ANSI C I/O but not select()?
Leafnode uses BSD-sockets, thus, I think there are none.
> > It may later allow to use fast I/O
> I had the impression that stdio was designed to be efficient in how it
> buffers. I gather I'm being naive?
stdio is designed like that and a decent implementation will work like
that, however, some stdio functions have bad semantics, and some stdio
implementations are broken (there are snprintf implementations that
overwrite the buffer by 1 byte or something).
fgets is among the functions that have bad semantics (in that it does
not return the count of characters it just read), the gory
ferror()/feof() queries are also among them.
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list