[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1725683124654161.jpg (306 KB, 892x1082)
306 KB
306 KB JPG
previous: >>108227695

#define __NR_wait4                61
#define __NR_waitid 247

https://man7.org/linux/man-pages/man2/wait.2.html

tl;dr:
reap your children
or manage your ptracee
or wait for a signal in your children

it's interesting. in the manpage for wait, it only over uses the term child, but in the ptrace one, it says tracee. i'm relatively certain that the ptrace manpage is correct, and you still use waitpid on non-child processes. the wait manpage should probably be updated. not a huge deal though, and i guess the ptrace manpage touches on this
>Real parent
>The ptrace API (ab)uses the standard UNIX parent/child signaling over waitpid(2). This used to cause the real parent of the process to stop receiving several kinds of waitpid(2) notifications when the child process is traced by some other process.
pretty interesting. it's still quite a few days off, but i guess feel free to discuss ptrace here, as well. probably one of the most fun syscalls out there
https://man7.org/linux/man-pages/man2/ptrace.2.html

relevant resources:
man man

man syscalls

https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
>>
>>108236633
oh, i guess i should include this link, as well
https://man7.org/linux/man-pages/man2/wait4.2.html
since it's not referenced in the other wait manpage
>>
rip



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.