parent pid in parent NS is invisible to child, even when child got signalled from parent, the signaller process should be fake parent (PID 0).
Signed-off-by: Monson Shao <[email protected]> --- testcases/kernel/containers/pidns/pidns16.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/testcases/kernel/containers/pidns/pidns16.c b/testcases/kernel/containers/pidns/pidns16.c index debc8d2..5b8247b 100644 --- a/testcases/kernel/containers/pidns/pidns16.c +++ b/testcases/kernel/containers/pidns/pidns16.c @@ -54,7 +54,6 @@ char *TCID = "pidns16"; int TST_TOTAL = 3; -pid_t globalpid; /* * cleanup() - performs all ONE TIME cleanup for this test at @@ -76,7 +75,7 @@ void child_signal_handler(int sig, siginfo_t * si, void *unused) switch (c) { case 1: - expected_pid = globalpid; + expected_pid = PARENT_PID; break; case 2: expected_pid = CHILD_PID; @@ -138,8 +137,6 @@ int main(int argc, char *argv[]) int status; pid_t cpid; - globalpid = getpid(); - cpid = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, NULL); if (cpid < 0) { -- 1.7.11.7 ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
