[vlc-commits] file output: unfix SIGPIPE blocking if POSIX RTS is unsupported

Rémi Denis-Courmont git at videolan.org
Sun May 31 12:14:50 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 31 13:14:15 2015 +0300| [73d2f955af1ba2d74801a92eb2d3a074dc0d28b1] | committer: Rémi Denis-Courmont

file output: unfix SIGPIPE blocking if POSIX RTS is unsupported

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73d2f955af1ba2d74801a92eb2d3a074dc0d28b1
---

 modules/access_output/file.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/access_output/file.c b/modules/access_output/file.c
index 87213c9..3e57fd3 100644
--- a/modules/access_output/file.c
+++ b/modules/access_output/file.c
@@ -103,7 +103,7 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
     return i_write;
 }
 
-#ifdef S_ISSOCK
+#if (_POSIX_REALTIME_SIGNALS > 0)
 static ssize_t WritePipe(sout_access_out_t *access, block_t *block)
 {
     int fd = (intptr_t)access->p_sys;
@@ -156,7 +156,11 @@ static ssize_t WritePipe(sout_access_out_t *access, block_t *block)
 
     return total;
 }
+#else
+# define WritePipe Write
+#endif
 
+#ifdef S_ISSOCK
 static ssize_t Send(sout_access_out_t *access, block_t *block)
 {
     int fd = (intptr_t)access->p_sys;
@@ -191,8 +195,6 @@ static ssize_t Send(sout_access_out_t *access, block_t *block)
     }
     return total;
 }
-#else
-# define WritePipe Write
 #endif
 
 /*****************************************************************************



More information about the vlc-commits mailing list