2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00

ovs-thread: We don't use fork in Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-03-12 10:32:59 -07:00
parent d9d404aecc
commit 40a9237d2b
2 changed files with 4 additions and 0 deletions

View File

@@ -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

View File

@@ -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);