Hello, everyone.
I'm asking because even if I give the -C option when running the apptainer run command, all related processes are killed by an internal kill -9 0.
The relevant test code is available at https://github.com/geonmo/pid_namespace_test.
Here, I have isolated pid, ipc, etc. with the -C option, but all related apptainers are killed by the kill -9 0 from the last apptainer run.
I'm wondering if this is the intended design.
When I ran the same test on podman, it isolated well and did not affect other podman instances.
Regards,
-- Geonmo
Hello, Dave.
First, I'll assume that the apptainer shell -C option is intended not to change the PGID, unlike podman, as you mentioned.
Another team worked on adding the setsid command when running individual analyses to prevent parent jobs from terminating due to a buggy application inside Apptainer.
If it was not intended that the child processes inherit the same PGID despite isolating the pid namespace, we could have waited for a patch in Apptainer, but as you said, if it is intended, setsid is a proper solution.
Thank you for your kind response.