diff options
author | Stefan Eßer <se@FreeBSD.org> | 2004-12-30 21:51:22 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2004-12-30 21:51:22 +0000 |
commit | e045a7d071662170b1e07f75847b7b81af96e443 (patch) | |
tree | 1f42e62bb51282013ba9f9c52f92902c32577b70 /games/xblast | |
parent | 55fb9b78fa47dfe27f5b057bb93ea335a960a3da (diff) |
Notes
Diffstat (limited to 'games/xblast')
-rw-r--r-- | games/xblast/files/patch-ab | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/games/xblast/files/patch-ab b/games/xblast/files/patch-ab index f9c8bbad48a6..936b9edee17c 100644 --- a/games/xblast/files/patch-ab +++ b/games/xblast/files/patch-ab @@ -1,6 +1,6 @@ ---- xbsndsrv.c.orig Sat Sep 7 17:50:18 2002 -+++ xbsndsrv.c Sat Sep 7 17:50:25 2002 -@@ -110,7 +110,7 @@ +--- xbsndsrv.c.orig Wed Jul 7 12:53:13 2004 ++++ xbsndsrv.c Thu Dec 30 21:45:25 2004 +@@ -43,7 +43,7 @@ #include <sys/ioctl.h> #include <sys/time.h> #ifdef __FreeBSD__ @@ -9,3 +9,28 @@ #else #include <linux/soundcard.h> #endif +@@ -723,16 +723,23 @@ + int n; + struct timeval tv; + fd_set rs; ++ fd_set es; + + while(1) + { + tv.tv_sec = tv.tv_usec = 0; + FD_ZERO(&rs); + FD_SET(0, &rs); ++ FD_ZERO(&es); ++ FD_SET(0, &es); + +- if (select(1, &rs, NULL, NULL, &tv) > 0 && FD_ISSET(0, &rs)) ++ if (select(1, &rs, NULL, &es, &tv) > 0 && FD_ISSET(0, &rs)) + { + n = read(0, command_buff, 8); ++ if ((n == 0) && FD_ISSET(0, &es)) { ++ fprintf(stderr, "Parent was killed, bailing out ...\n"); ++ exit(0); ++ } + cmd = command_buff; + /* there are commands in the pipe */ + while (n > 0) |