]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/os-Linux/helper.c
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
[linux-2.6-omap-h63xx.git] / arch / um / os-Linux / helper.c
index d81af7b8587a8331cae925c71802841ad181cb1e..7a72dbb61b0d6d19d37d67ee44fc7bd4c64e93c5 100644 (file)
@@ -11,6 +11,7 @@
 #include <limits.h>
 #include <sys/signal.h>
 #include <sys/wait.h>
+#include <sys/socket.h>
 #include "user.h"
 #include "kern_util.h"
 #include "os.h"
@@ -54,13 +55,14 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
        if (stack == 0)
                return -ENOMEM;
 
-       ret = os_pipe(fds, 1, 0);
+       ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fds);
        if (ret < 0) {
-               printk("run_helper : pipe failed, ret = %d\n", -ret);
+               ret = -errno;
+               printk("run_helper : pipe failed, errno = %d\n", errno);
                goto out_free;
        }
 
-       ret = os_set_exec_close(fds[1], 1);
+       ret = os_set_exec_close(fds[1]);
        if (ret < 0) {
                printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n",
                       -ret);