summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-09-19 18:45:11 +0000
committerfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-09-19 18:45:11 +0000
commita5b8e5f858e6e43c482ee5f70f19e64684d6e018 (patch)
tree3f016bc50f2c85c2f85211dc5c31f925c26d484b /mplayer.c
parentb63f5b3e8510511978b073128e3e5843c6b1177b (diff)
downloadmpv-a5b8e5f858e6e43c482ee5f70f19e64684d6e018.tar.bz2
mpv-a5b8e5f858e6e43c482ee5f70f19e64684d6e018.tar.xz
handle sigchld in mplayer.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13392 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 07c7a11646..c86425ff36 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -489,6 +489,13 @@ void exit_player(char* how){
exit_player_with_rc(how, 1);
}
+#ifndef __MINGW32__
+static void child_sighandler(int x){
+ pid_t pid;
+ while((pid=waitpid(-1,NULL,WNOHANG)) > 0);
+}
+#endif
+
static void exit_sighandler(int x){
static int sig_count=0;
++sig_count;
@@ -1148,7 +1155,10 @@ current_module = NULL;
}
#endif
-
+ /// Catch signals
+#ifndef __MINGW32__
+ signal(SIGCHLD,child_sighandler);
+#endif
//========= Catch terminate signals: ================
// terminate requests: