summaryrefslogtreecommitdiff
path: root/src/process/fork.c
blob: a12da01abb0057257c39aa5f5640c17f292a4393 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <unistd.h>
#include "libc.h"

static void dummy(int x) { }
weak_alias(dummy, __fork_handler);

pid_t fork(void)
{
	__fork_handler(-1);
	pid_t ret = _Fork();
	__fork_handler(!ret);
	return ret;
}