On Fri, 28 Jun 2002 13:44:01 +0200
31 <[EMAIL PROTECTED]> wrote:

> ¿Como puedo hacer en C que una llamada a read() no sea bloqueante?
> En el man veo esto, pero no se donde o como lo tengo que definir.
> 
> ERRORS
>        EINTR  The call was interrupted by  a  signal  before  any
>               data was read.
> 
>        EAGAIN Non-blocking I/O has been selected using O_NONBLOCK
>               and no data was immediately available for  reading.
> 
> ¿Como puedo usar el O_NONBLOCK? ¿donde tengo que ponerlo?

man fcntl(2); por ejemplo:

        if (fcntl (fd, F_SETFL, O_NONBLOCK))
          perror ("fcntl");

Si abriste el fichero con fopen(3), puedes usar fileno(3) para descubrir
el descriptor fd.

-- 
Christoph Simon
[EMAIL PROTECTED]
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to