summaryrefslogtreecommitdiffstats
path: root/main/vlc/fix-waitpid-usage.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-07 14:25:50 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-10-07 14:26:14 +0300
commitc5461a8402d2c56f1e0c63da482b179e945b1242 (patch)
treeeecae06cd9c9e0d2a31f5001d0a9223a8874f195 /main/vlc/fix-waitpid-usage.patch
parent65553514aca702cc7ae6f9208a0728291b648a65 (diff)
downloadaports-c5461a8402d2c56f1e0c63da482b179e945b1242.tar.bz2
aports-c5461a8402d2c56f1e0c63da482b179e945b1242.tar.xz
main/vlc: fix some waitpid usage
Diffstat (limited to 'main/vlc/fix-waitpid-usage.patch')
-rw-r--r--main/vlc/fix-waitpid-usage.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/vlc/fix-waitpid-usage.patch b/main/vlc/fix-waitpid-usage.patch
new file mode 100644
index 000000000..5d19ddb1d
--- /dev/null
+++ b/main/vlc/fix-waitpid-usage.patch
@@ -0,0 +1,42 @@
+--- vlc-2.1.0.orig/modules/misc/inhibit/xdg.c 2013-06-24 21:00:38.000000000 +0300
++++ vlc-2.1.0/modules/misc/inhibit/xdg.c 2013-10-07 14:06:43.450029073 +0300
+@@ -66,7 +66,7 @@
+ {
+ int status;
+
+- while (waitpid (pid, &status, 0) == -1);
++ while (waitpid (pid, &status, 0) == -1 && errno != ECHILD);
+ }
+ else
+ {
+--- vlc-2.1.0.orig/modules/stream_filter/decomp.c 2013-09-12 18:18:33.000000000 +0300
++++ vlc-2.1.0/modules/stream_filter/decomp.c 2013-10-07 14:07:58.616288530 +0300
+@@ -386,7 +386,7 @@
+ return VLC_SUCCESS;
+
+ if (p_sys->pid != -1)
+- while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1);
++ while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1 && errno != ECHILD);
+ vlc_mutex_destroy (&p_sys->lock);
+ vlc_cond_destroy (&p_sys->wait);
+ free (p_sys);
+@@ -411,7 +411,7 @@
+ close (p_sys->write_fd);
+
+ msg_Dbg (obj, "waiting for PID %u", (unsigned)p_sys->pid);
+- while (waitpid (p_sys->pid, &status, 0) == -1);
++ while (waitpid (p_sys->pid, &status, 0) == -1 && errno != ECHILD);
+ msg_Dbg (obj, "exit status %d", status);
+
+ if (p_sys->peeked)
+--- vlc-2.1.0.orig/src/posix/netconf.c 2013-06-24 21:00:39.000000000 +0300
++++ vlc-2.1.0/src/posix/netconf.c 2013-10-07 14:05:49.603654117 +0300
+@@ -93,7 +93,7 @@
+ while (len < sizeof (buf));
+
+ close(fd[0]);
+- while (waitpid(pid, &(int){ 0 }, 0) == -1);
++ while (waitpid(pid, &(int){ 0 }, 0) == -1 && errno != ECHILD);
+
+ if (len >= 9 && !strncasecmp(buf, "direct://", 9))
+ return NULL;