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

Rafaël Carré rafael.carre at gmail.com
Sat Jul 11 16:04:44 CEST 2009


On Sat, 11 Jul 2009 15:46:44 +0200
Fabian Keil <freebsd-listen at fabiankeil.de> wrote:

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

I believe EINTR is a valid error even if it's not explicited in the
manpage. If it's the case it should be handled by vlc.

I'm not very familiar with the posix standard so I'll let courmisch
confirm or infirm.

-- 
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090711/2e0982a6/attachment.sig>


More information about the vlc-devel mailing list