diff options
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h index eb175c961f..ee3c6eba48 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -45,4 +45,11 @@ int tv_cmp(struct timeval *a, struct timeval *b); void set_socket_nonblocking(int socket); +/* Minimalist interface to run a void function in the background. On + unix calls fork, on win32 calls beginthread. Returns -1 on failure. + func should not return, but rather should call spawn_exit. +*/ +int spawn_func(int (*func)(void *), void *data); +void spawn_exit(); + #endif |