previous: >>108039753
#define __NR_shmctl 31
#define __NR_shmdt 67
https://man7.org/linux/man-pages/man2/shmctl.2.html
https://man7.org/linux/man-pages/man2/shmdt.2.html
our first day of combined syscalls (aside from the first day)! we'll see how this goes. but hopefully this will keep any interest a little more concentrated, and will let us skip the boring days somewhat.
the most interesting section of the manpage, at least to me personally, is this:
>The caller must ensure that a segment is eventually destroyed; otherwise its pages that were faulted in will remain in memory or swap.
talk about a nightmare leak scenario. if i'm reading this correctly (and please correct me if i'm wrong), it's totally possible to leak kernel resources with this. so good luck to those who never reboot their machines...
that seemed a bit strange to me, so i went and looked it up, and it looks like there's a configurable answer: https://docs.kernel.org/admin-guide/sysctl/kernel.html#shm-rmid-forced
so that's good, at least
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/