Commit f8f9b3f6 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Rémi Denis-Courmont

os2: filesystem: set pipes to binary mode

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 3b6b39ac
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <io.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <dirent.h> #include <dirent.h>
...@@ -337,6 +338,9 @@ int vlc_pipe (int fds[2]) ...@@ -337,6 +338,9 @@ int vlc_pipe (int fds[2])
if (pipe (fds)) if (pipe (fds))
return -1; return -1;
setmode (fds[0], O_BINARY);
setmode (fds[1], O_BINARY);
fcntl (fds[0], F_SETFD, FD_CLOEXEC); fcntl (fds[0], F_SETFD, FD_CLOEXEC);
fcntl (fds[1], F_SETFD, FD_CLOEXEC); fcntl (fds[1], F_SETFD, FD_CLOEXEC);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment