Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

blocking read stdin patch (Re: zsh-workers: zsh-3.1.4)



Hello,

In message <199806010819.JAA27897@xxxxxxxxxxxxxxxxx>,
Zefram wrote
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> Zsh version 3.1.4 has been released, and an announcement posted to
> zsh-announce.

(snip)

> 3950  set blocking read on stdin
>     I'm rather dubious about this EWOULDBLOCK business.  I think this
>     should be EAGAIN.  I'm also a bit suspicious about where the blocking
>     status is being changed, but I haven't examined it in detail yet.

(snip)

In 4.2BSD, non-blocking read will be return by EWOULDBLOCK,
But in POSIX it should be EAGAIN.

Some OS (like SunOS4.1.X or Ultrix) may return both error.
It seems to be decided by compile environment
or what flag was used for blocking read.

In SunOS 4.1.X,
When set O_NONBLOCK, will be EWOULDBLOCK,
When set O_NDELAY, will be EAGAIN.

In 4.4BSD and Digital UNIX(3.2 and 4.0),
EWOULDBLOCK and EAGAIN are same value,
thus Zoltan's patch works fine.

				yamagata



Messages sorted by: Reverse Date, Date, Thread, Author