[vlc-commits] rootwrap: use BSD SO_NOSIGPIPE
Rémi Denis-Courmont
git at videolan.org
Thu May 21 19:32:58 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 21 20:30:50 2015 +0300| [5a5fa91d2dc9fefbb888ccf5d7123993c2716aaf] | committer: Rémi Denis-Courmont
rootwrap: use BSD SO_NOSIGPIPE
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a5fa91d2dc9fefbb888ccf5d7123993c2716aaf
---
bin/rootwrap.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bin/rootwrap.c b/bin/rootwrap.c
index 6e49ee8..55944ac 100644
--- a/bin/rootwrap.c
+++ b/bin/rootwrap.c
@@ -193,6 +193,10 @@ int main (int argc, char *argv[])
if (pair[0] < 3)
goto error; /* we want 0, 1 and 2 open */
+#ifdef SO_NOSIGPIPE
+ setsockopt(pair[1], SOL_SOCKET, SO_NOSIGPIPE, &(int){ 1 }, sizeof (int));
+#endif
+
pid_t pid = fork ();
switch (pid)
{
More information about the vlc-commits
mailing list