#include <signal.h>
#include <sched.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <errno.h>
#include <lttng/ust-fork.h>
pid_t rfork(int flags)
{
- static pid_t (*plibc_func)(void) = NULL;
+ static pid_t (*plibc_func)(int flags) = NULL;
sigset_t sigset;
pid_t retval;
int saved_errno;
lttng_ust_before_fork(&sigset);
/* Do the real rfork */
- retval = plibc_func();
+ retval = plibc_func(flags);
saved_errno = errno;
if (retval == 0) {
/* child */