[vlc-devel] Re: vlc: svn commit r19402 (fenrir)

Rémi Denis-Courmont rem at videolan.org
Sun Mar 25 20:02:00 CEST 2007


Le dimanche 25 mars 2007 20:50, Laurent Aimar a écrit :
>  Now, I have seen that you decided to block it before waiting for
> comments. Fine. But:
>  - it's not really portable. Until POSIX.1-2001 ignoring SIGCHLD was
> disallowed (and was creating zombies, man sigaction)
>  - calls to system() will always report failure.
>  - I don't know for exec (we use it in http) but it is likely it will
> do the same. (and by ignoring SIGCHLD our vlc_exec seems to loop
> forever)
>
>  So it would be better/safer to revert it. Is that over complicated
> to just check for EINTR a few times ?

Didn't I already mention libraries? You will modify all underlying 
libraries to do the same thing? You cannot expect a library that does 
not use fork() neither system() to expect/handle interruption properly. 
In fact, eating up EINTR would not even be correct, since some people 
might actually want it to interrupt operation. Bottom line is do not 
let SIGCHLD to non-unrelated threads. If you need it, unblock it around 
fork/system and reblock it before ever calling vlc_create_thread.

That's the only safe mode of operation in a multi-thread program.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070325/78113069/attachment.sig>


More information about the vlc-devel mailing list