changeset 16049:0ccf19820216

define SIGHUP and SIGPIPE for MinGW and catch SIGPIPE also in mplayer
author reimar
date Fri, 22 Jul 2005 17:11:39 +0000
parents 200dafcc7b10
children 893441f6e95f
files mencoder.c mplayer.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Fri Jul 22 12:06:26 2005 +0000
+++ b/mencoder.c	Fri Jul 22 17:11:39 2005 +0000
@@ -27,7 +27,9 @@
 #include "config.h"
 
 #ifdef __MINGW32__
+#define        SIGHUP 1
 #define        SIGQUIT 3
+#define        SIGPIPE 13
 #endif
 #ifdef WIN32
 #include <windows.h>
--- a/mplayer.c	Fri Jul 22 12:06:26 2005 +0000
+++ b/mplayer.c	Fri Jul 22 17:11:39 2005 +0000
@@ -19,6 +19,7 @@
 #define	SIGQUIT	3	/* quit */
 #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
 #define	SIGBUS	10	/* bus error */
+#define	SIGPIPE	13	/* broken pipe */
 extern int mp_input_win32_slave_cmd_func(int fd,char* dest,int size);
 #endif
 
@@ -1435,6 +1436,7 @@
   signal(SIGINT,exit_sighandler);  // Interrupt from keyboard
 
   signal(SIGQUIT,exit_sighandler); // Quit from keyboard
+  signal(SIGPIPE,exit_sighandler); // Some window managers cause this
 #ifdef ENABLE_SIGHANDLER
   // fatal errors:
   signal(SIGBUS,exit_sighandler);  // bus error