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

Laurent Aimar fenrir at via.ecp.fr
Sun Mar 25 19:50:53 CEST 2007

On Sun, Mar 25, 2007, Rémi Denis-Courmont wrote:
> Le dimanche 25 mars 2007 01:54, Laurent Aimar a écrit :
> >  All ?
> >  SIGCHLD is currently not ignored and that's the one doing it
> > in my case (probably because system() is called by screensaver.c)
> >  Btw, ignoring SIGCHLD is not an option...
> SIGCHLD *is* ignored by default (man 7 signal). In fact, system() itself 
> blocks SIGCHLD (man system)!! Proprely written code uses wait() anyway 
> regardless of SIGCHLD.
 Mouarf, SIGCHLD will interrupt poll/select/... by default.
Just try sigchld.c (gcc -o s sigchld.c -Wall -lpthread)

 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 ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigchld.c
Type: text/x-csrc
Size: 517 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070325/f829998d/attachment.c>

More information about the vlc-devel mailing list