#1869 SIGCHLD handler reaps all child processes, causing crashes

Cosmetic
open
nobody
None
5
2015-01-11
2013-12-02
rofl0r
No
<A> Program received signal SIGSEGV, Segmentation fault.
<B> there's a SIGCHLD handler that's calling wait
<C> calling wait in a SIGCHLD handler sounds like a bad idea
<B> which program is it ?
<A> exult
<A> it happens when you enable sound output
<B> can you find where in the code it's installing the SIGCHLD handler?
<A> https://github.com/rofl0r/exult/blob/master/exult.cc#L285
<A> // a SIGCHLD handler to properly clean up forked playmidi processes (if any)
<B> i would just remove that line
<B> the proper way to cleanup the zombie is to save its pid and waitpid() for it at the appropriate time
<B> not indiscriminately reap all child processes
<B> but fixing that requires finding the code that's creating the playmidi processes

in short: it's a bug to reap all childs, because other libs may legally creates processes and exult has no business disturbing them.

patch: http://sprunge.us/PGfK (will be automatically deleted in about 2 months)

Discussion

  • Willem Jan Palenstijn

    1. Don't use external temporary hosts for patches; attach the files here.

    2. That patch makes forked_player leave zombies. But we should delete forked_player entirely, probably.

     
  • i30817

    i30817 - 2014-03-23

    Forked player doesn't even work in ubuntu (it crashes right away because the cmd line utility it is using doesn't exist on non OSS systems and most linux is non OSS now).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks