Please find the testcase for the below scenario. Assertion:
** kill - USR1 container_init,
**      - from the parent process and also inside a container,
**      - Where init has defined a custom handler for USR1,
**      - Should call the handler, and,
**      - Verify whether the signal handler is called from the proper process.
Signed-off by: Veerendra C <vechandr@in.ibm.com>,
Results:
# ./pidns16
pidns16     0  INFO  :  sig_handler is signalled from pid  29640
pidns16     0  INFO  :  Container: Resumed after receiving SIGUSR1 from parentNS
pidns16     0  INFO  :  sig_handler is signalled from pid  1
pidns16     0  INFO  :  Container: Resumed after sending SIGUSR1 from container itself
pidns16     1  PASS  :  container init continued successfuly, after handling signal -USR1
Suka,
After your comments, now I am checking in the signal handler the sending procee id. If it is from the parent ns and when it is from container init. Also made some small changes after doing waitpid() in main.
1 file changed