[vlc-devel] exit(0) → _exit(0) in CPUCapabilities

Martin T. Sandsmark sandsmark at samfundet.no
Tue Dec 29 16:31:33 CET 2009


Hi!

In src/misc/cpu.c, you call exit (3) after forking and checking for the 
capability, which can have unintended consequences for C++ applications using 
libvlc (and for example using DBus), because it invokes destructors and 
whatnot.

In the case of Phonon, you will for example often receive duplicate DBus 
messages, leading to a crash.

I propose using _exit (2) instead, which should have no unintended side-
effects, please see the attachment for a proposed patch.

Thanks to Thiago Macieira from Nokia for helping me track down this, and for 
the proposed fix.

PS.: Please CC me on any replies, as I'm not subscribed to vlc-devel at v.o.

-- 
Martin Sandsmark
Phonon maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exit-to-_exit.diff
Type: text/x-patch
Size: 975 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091229/b2c16f36/attachment.bin>


More information about the vlc-devel mailing list