syscall.sh / sh / waitpid
waitpid
wait for process to change state
sys_waitpid(pid_t pid, int *stat_addr, int options)
| number | 7 (0x7) |
|---|---|
| abi | common |
| entry point | sys_waitpid |
| since | Linux 5.0 |
| man page | waitpid(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
r3 | 7, the syscall number |
r4 | pid_t pid |
r5 | int *stat_addr |
r6 | int options |
r0 | the return value |
Then run trapa #31 to enter the kernel.
Same syscall on other architectures
Get this as JSON: https://api.syscall.sh/v2/syscalls/sh/waitpid