Lines Matching +full:include +full:- +full:pid
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (c) 2012-2018 Cyril Hrubis <chrubis@suse.cz>
8 * wait401 - check that a call to wait4() correctly waits for a child
12 #include <stdlib.h>
13 #include <errno.h>
15 #include <sys/types.h>
16 #include <sys/resource.h>
17 #include <sys/wait.h>
18 #include "tst_test.h"
22 pid_t pid; in run() local
26 pid = SAFE_FORK(); in run()
27 if (!pid) { in run()
32 TST_EXP_PID_SILENT(wait4(pid, &status, 0, &rusage), "wait4()"); in run()
36 if (TST_RET != pid) { in run()
37 tst_res(TFAIL, "wait4() returned wrong pid %li, expected %i", in run()
38 TST_RET, pid); in run()
40 tst_res(TPASS, "wait4() returned correct pid %i", pid); in run()