From: Gurucharan Shetty Date: Wed, 12 Mar 2014 17:32:59 +0000 (-0700) Subject: ovs-thread: We don't use fork in Windows. X-Git-Tag: sliver-openvswitch-2.2.90-1~6^2~109 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=40a9237d2bac80c8cbfcdccffa2bc72173e08d98;p=sliver-openvswitch.git ovs-thread: We don't use fork in Windows. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index 85de014ec..76cbbd325 100644 --- a/lib/ovs-thread.c +++ b/lib/ovs-thread.c @@ -322,6 +322,7 @@ assert_single_threaded_at(const char *where) } } +#ifndef _WIN32 /* Forks the current process (checking that this is allowed). Aborts with * VLOG_FATAL if fork() returns an error, and otherwise returns the value * returned by fork(). @@ -345,6 +346,7 @@ xfork_at(const char *where) } return pid; } +#endif /* Notes that the process must not call fork() from now on, for the specified * 'reason'. (The process may still fork() if it execs itself immediately diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h index 8868c5115..d3bd538a4 100644 --- a/lib/ovs-thread.h +++ b/lib/ovs-thread.h @@ -601,8 +601,10 @@ unsigned long long int ovsthread_counter_read( void assert_single_threaded_at(const char *where); #define assert_single_threaded() assert_single_threaded_at(SOURCE_LOCATOR) +#ifndef _WIN32 pid_t xfork_at(const char *where); #define xfork() xfork_at(SOURCE_LOCATOR) +#endif void forbid_forking(const char *reason); bool may_fork(void);