Hello,
I am observing that if two containers are spawned via lxc-execute and if
these happen to be in the same process group, a process inside one
container can terminate the second container by sending a SIGTERM to the
process group.
Code snippet of the test program that was running inside the container (via
lxc-execute):-
--
void handle_term(int sig)
{
signal(SIGTERM, SIG_DFL);
kill(0, SIGTERM);
}
int main()
{
signal(SIGTERM, handle_term);
sleep(3600);
}
----
I forked two copies of this via lxc-execute and made sure that they have
the same process group ID and sent a SIGTERM to the first lxc-execute.
The second container (where SIGTERM was not sent) apparently gets a SIGTERM
from PID 2 of the first container.
---
write(3, " lxc-execute 1334131101.756 INFO lxc_start - received
signal 15 from pid 2, uid 36886\n", 94) = 94
write(3, " lxc-execute 1334131101.756 INFO lxc_start - forwarded
signal 15 to pid 14875\n", 85) = 85
---
Is this expected behavior ? Shouldn't two process in independent PID
namespaces get their own copy of process group IDs ?
Thanks,
Arun
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Lxc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-users