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

Pierre Ynard linkfanel at yahoo.fr
Sun Mar 18 09:08:56 CET 2012


> > 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).

Okay but we use poll() here.

> In particular, POLLIN|POLLERR should only be checked together, not
> separately.

I don't know what produces POLLERR, but:

echo help | vlc -I cli

After "help\n" was read, this returns POLLHUP. The POLLIN flag is not
set.

> 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.

Indeed and this change doesn't make a difference on the kind of file
descriptor used.

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."



More information about the vlc-devel mailing list