After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689547 - Setting SIGCHLD to SIG_IGN is propagated to child processes
Setting SIGCHLD to SIG_IGN is propagated to child processes
Status: RESOLVED FIXED
Product: easytag
Classification: Other
Component: general
2.1.x
Other Linux
: Normal normal
: 2.1
Assigned To: EasyTAG maintainer(s)
EasyTAG maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-12-03 16:59 UTC by David King
Modified: 2012-12-04 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
revised patch to add SIGCHLD handler (1.72 KB, patch)
2012-12-03 17:05 UTC, David King
none Details | Review
add a missing space to patch (1.72 KB, patch)
2012-12-03 18:30 UTC, David King
committed Details | Review

Description David King 2012-12-03 16:59:42 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.
Comment 1 David King 2012-12-03 17:05:08 UTC
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).
Comment 2 David King 2012-12-03 18:30:39 UTC
Created attachment 230558 [details] [review]
add a missing space to patch
Comment 3 David King 2012-12-04 09:12:16 UTC
Comment on attachment 230558 [details] [review]
add a missing space to patch

Pushed a slightly modified version to master as commit e84f769cc57d3f33b163ec17107a84c967a98baa.