[ovs-dev] [PATCH 3/5] socket-util: pipe for Windows.

Gurucharan Shetty shettyg at nicira.com
Wed Feb 26 18:51:58 UTC 2014

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 at nicira.com>
 lib/socket-util.c |    2 ++
 lib/socket-util.h |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/socket-util.c b/lib/socket-util.c
index 728c76e..ee5794e 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -1030,6 +1030,7 @@ get_mtime(const char *file_name, struct timespec *mtime)
+#ifndef _WIN32
 xpipe(int fds[2])
@@ -1045,6 +1046,7 @@ xpipe_nonblocking(int fds[2])
 static int
 getsockopt_int(int fd, int level, int option, const char *optname, int *valuep)
diff --git a/lib/socket-util.h b/lib/socket-util.h
index 92f0c6f..2acc974 100644
--- a/lib/socket-util.h
+++ b/lib/socket-util.h
@@ -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]);
 char *describe_fd(int fd);

More information about the dev mailing list