bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read -t 0 not supported? (poll)


From: Pierre Gaston
Subject: Re: read -t 0 not supported? (poll)
Date: Wed, 22 Jul 2009 13:03:39 +0300

On Wed, Jul 22, 2009 at 12:03 PM, Marc Herbert
<Marc.Herbert+news@gmail.com<Marc.Herbert%2Bnews@gmail.com>
> wrote:

> Hi,
>
>  It seems polling using "read -t 0" is not supported. Apparently because
> the implementation is based on alarm() (as opposed to be based on
> poll()/select()).
>
> - is this true?
> - if yes, doesn't this deserve more explicit documentation?
>
> Would anyone know about an alternative, convenient way to poll() ? Thanks
> in advance!
>
> Cheers,
>
> Marc
>
>
> read -t 0 is a new feature of bash 4:

"If timeout is 0, read returns success if input is available on the
specified file descriptor, failure otherwise."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]