socket-util: pipe for Windows.
authorGurucharan Shetty <gshetty@nicira.com>
Wed, 26 Feb 2014 16:47:37 +0000 (08:47 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 26 Feb 2014 20:39:55 +0000 (12:39 -0800)
Windows does have pipes (the interface is a little different).
We mostly use pipes in Linux to synchronize between parent and
children and also to handle fatal signals and then wake from poll_loop().

For Windows, we are using events for the same purpose. So don't
implement pipes for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/socket-util.c
lib/socket-util.h

index 5301d27..f7d2d0f 100644 (file)
@@ -1047,6 +1047,7 @@ get_mtime(const char *file_name, struct timespec *mtime)
     }
 }
 
+#ifndef _WIN32
 void
 xpipe(int fds[2])
 {
@@ -1062,6 +1063,7 @@ xpipe_nonblocking(int fds[2])
     xset_nonblocking(fds[0]);
     xset_nonblocking(fds[1]);
 }
+#endif
 
 static int
 getsockopt_int(int fd, int level, int option, const char *optname, int *valuep)
index 92f0c6f..2acc974 100644 (file)
@@ -65,8 +65,10 @@ int write_fully(int fd, const void *, size_t, size_t *bytes_written);
 int fsync_parent_dir(const char *file_name);
 int get_mtime(const char *file_name, struct timespec *mtime);
 
+#ifndef _WIN32
 void xpipe(int fds[2]);
 void xpipe_nonblocking(int fds[2]);
+#endif
 
 char *describe_fd(int fd);