[vlc-devel] [vlc-commits] lua: do delete stdin/stdout client

Rémi Denis-Courmont remi at remlab.net
Sun Mar 18 08:26:08 CET 2012

Le dimanche 18 mars 2012 05:09:24 Pierre Ynard, vous avez écrit :
> vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Mar 18
> 04:06:36 2012 +0100| [525e092dfd845b71af030fba2332ea961a4c2d37] |
> committer: Pierre Ynard
> lua: do delete stdin/stdout client
> This fixes an endless loop when piping commands to stdin with echo
> for example

Eh? A file descriptor with a pending error can be considered to readable (I 
guess it depends on the driver). You should keep reading the file until read() 
returns an error (other than EAGAIN) or 0 (end-of-stream). In particular, 
POLLIN|POLLERR should only be checked together, not separately.

And stdio is no different from sockets in that respect. In fact, it can be a 
socket... The only difference is that you get to use different descriptors for 
input and output.

Rémi Denis-Courmont

More information about the vlc-devel mailing list