Handle SIGCHLD to avoid problems in child process
- From: Alessio Ababilov <ilovegnulinux gmail com>
- To: easytag-list gnome org
- Subject: Handle SIGCHLD to avoid problems in child process
- Date: Mon, 3 Dec 2012 12:47:43 +0200
Hi!
I've found a problem in EasyTAG-Audacious interaction and I would like to propose a patch (https://github.com/aababilov/easytag/commit/dcebb6b05987dfd3621215597afb7799df7651f3).
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.
Sincerely,
Alessio Ababilov
Attachment:
0001-Handle-SIGCHLD-to-avoid-problems-in-child-process.patch
Description: Binary data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]