summaryrefslogtreecommitdiff
path: root/audio/esound/files
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2008-07-18 04:35:19 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2008-07-18 04:35:19 +0000
commit54b9cc63c77c85ec6b44498d8d8497988b3dc0c3 (patch)
tree032e12fe26b7313375988abfa0b11b5a3cb55cfe /audio/esound/files
parent- new option WITH_GEODB (diff)
Fix a potential infinite loop when starting esd from gnome-settings-daemon.
Diffstat (limited to 'audio/esound/files')
-rw-r--r--audio/esound/files/patch-ad15
1 files changed, 12 insertions, 3 deletions
diff --git a/audio/esound/files/patch-ad b/audio/esound/files/patch-ad
index 3632b7f873e0..20eeeab10606 100644
--- a/audio/esound/files/patch-ad
+++ b/audio/esound/files/patch-ad
@@ -1,5 +1,5 @@
--- esdlib.c.orig 2008-07-15 11:35:15.000000000 -0400
-+++ esdlib.c 2008-07-17 13:46:44.000000000 -0400
++++ esdlib.c 2008-07-18 00:33:42.000000000 -0400
@@ -21,6 +21,8 @@
#include <errno.h>
#include <sys/wait.h>
@@ -9,7 +9,16 @@
#include <sys/un.h>
-@@ -889,8 +891,7 @@ int esd_open_sound( const char *host )
+@@ -152,6 +154,8 @@ write_timeout (int fd, const char *buf,
+
+ if (n > 0)
+ nwritten += n;
++ else if (n < 0)
++ break;
+ } while (nwritten < buflen);
+
+ fcntl (fd, F_SETFL, flags);
+@@ -889,8 +893,7 @@ int esd_open_sound( const char *host )
setsid();
cmd = malloc(strlen(SERVERDIR"/esd -spawnfd 999999") + (esd_spawn_options?strlen(esd_spawn_options):0));
@@ -19,7 +28,7 @@
execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
perror("execl");
_exit(1);
-@@ -1703,3 +1704,34 @@ int esd_close( int esd )
+@@ -1703,3 +1706,34 @@ int esd_close( int esd )
return close( esd );
}