2 * Check decoding of waitpid syscall.
4 * Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
5 * Copyright (c) 2016-2019 The strace developers.
8 * SPDX-License-Identifier: GPL-2.0-or-later
18 # include <sys/wait.h>
24 (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid();
25 long rc = syscall(__NR_waitpid, pid, 0L, (unsigned long) WNOHANG);
26 printf("waitpid(%d, NULL, WNOHANG) = %ld %s (%m)\n",
27 (int) pid, rc, errno2name());
29 puts("+++ exited with 0 +++");
35 SKIP_MAIN_UNDEFINED("__NR_waitpid")