[vlc-devel] [PATCH] In SigThread, handle sigwait() failures gracefully.

Fabian Keil freebsd-listen at fabiankeil.de
Sat Jul 11 15:46:44 CEST 2009


Rafaël Carré <rafael.carre at gmail.com> wrote:

> On Sat, 11 Jul 2009 12:46:06 +0300
> "Rémi Denis-Courmont" <remi at remlab.net> wrote:
> 
> > Le vendredi 10 juillet 2009 23:50:33 Fabian Keil, vous avez écrit :
> > > The problem seems to be caused by vlc expecting a reasonable
> > > signal value in signum, even if sigwait() failed. The attached
> > > patch fixes the problem for me.
> > 
> > The only specified failure for sigwait() is an invalid input signal
> > set. I think this is not possible in that particular case. If it is
> > then a bug in the code above sigwait() needs to be fixed, not the
> > sigwait() code.
> 
> Fabian, what is the failure errno on FreeBSD ?

It's 4 which should be EINTR.

FreeBSD's sigwait() man page only explicitly mentions
EINVAL and EFAULT as return codes, so I'm not sure which
system call might have failed or if interpreting return
code 4 as EINTR in this case is even correct.

Changing SigThread() to only ignore sigwait() failures
in case of EINTR should work too, and would have less
risk of masking other problems, but of course it might
still be considered a workaround.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090711/295e0d3e/attachment.sig>


More information about the vlc-devel mailing list