GNOME Bugzilla – Bug 689547
Setting SIGCHLD to SIG_IGN is propagated to child processes
Last modified: 2012-12-04 09:12:32 UTC
From the mailing list: https://mail.gnome.org/archives/easytag-list/2012-December/msg00004.html When 'Run Audio Player' is selected in EasyTAG, the newly-launched Audacious will always switch to default skin if it was configured to use an archived skin. The thing is that EasyTAG calls signal(SIGCHLD,SIG_IGN) to avoid zombies. Usually, it works fine, but can be a problem. If one calls 'Run Audio Player', the player's SIGCHLD signal handler is inherited. So, when audacious calls system() in order to unpack its archived skin, the wait() call in system() function cannot hear that the child process has ended and returns an error. The Audacious process assumes that there was an real error and an unarchived skin is used. A possible solution is to set a handler for SIGCHLD in EasyTAG. The handler is called when a child process ends and the latter doesn't become a zombie.
Created attachment 230542 [details] [review] revised patch to add SIGCHLD handler I revised the original patch that was posted on the mailing list. Other than cosmetic changes, I fixed a compiler warning by calling memset() on the stack-created struct, rather than 0-initialising (the first field in the struct is a union on Linux, and therefore initialising with 0 is not valid).
Created attachment 230558 [details] [review] add a missing space to patch
Comment on attachment 230558 [details] [review] add a missing space to patch Pushed a slightly modified version to master as commit e84f769cc57d3f33b163ec17107a84c967a98baa.