about summary refs log tree commit diff
path: root/src/process/waitpid.c
blob: 5e0320f7b0bb9f2a935d61b73031425a92dddeee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <sys/wait.h>
#include "syscall.h"
#include "libc.h"

pid_t waitpid(pid_t pid, int *status, int options)
{
	int r;
	CANCELPT_BEGIN;
	r = syscall(SYS_wait4, pid, status, options, 0);
	if (r<0) CANCELPT_TRY;
	CANCELPT_END;
	return r;
}