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 个文件被修改,插入 1 行(+),删除 4 行(-)

diff --git a/testcases/kernel/containers/pidns/pidns16.c 
b/testcases/kernel/containers/pidns/pidns16.c
index 0c54acf..9d4cbdc 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 = 1;
-pid_t globalpid;
 
 /*
  * cleanup() - performs all ONE TIME cleanup for this test at
@@ -75,7 +74,7 @@ void child_signal_handler(int sig, siginfo_t * si, void 
*unused)
        /* Verifying from which process the signal handler is signalled */
 
        if (c == 1)
-               expected_pid = globalpid;
+               expected_pid = PARENT_PID;
        else if (c == 2)
                expected_pid = CHILD_PID;
        else {
@@ -134,8 +133,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

Reply via email to