From: Garrett C. <su...@li...> - 2011-01-10 03:51:15
|
The branch, master, has been updated via 6be4ba4589c8370dd4272a2fb5eccb568770f8b1 (commit) from 9307ff6672466180c1ad9870ef221484105a2418 (commit) - Log ----------------------------------------------------------------- commit 6be4ba4589c8370dd4272a2fb5eccb568770f8b1 Author: Garrett Cooper <yan...@gm...> Date: Mon Dec 20 15:50:04 2010 -0800 Fix testcase. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c index 71f2078..2914a48 100644 --- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c +++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c @@ -198,6 +198,15 @@ void do_child() exit(0); } +void +sighandler(int sig) +{ + if (sig == SIGHUP) + return; + else + tst_brkm(TBROK, NULL, "received unexpected signal %d", sig); +} + #ifdef UCLINUX /* * do_child_uclinux() - capture signals, initialize buffer, then run do_child() @@ -210,7 +219,7 @@ void do_child_uclinux() if (sync_pipe_create(sync_pipes, PIPE_NAME) == -1) tst_brkm(TBROK, cleanup, "sync_pipe_create failed"); - tst_sig(FORK, SIG_IGN, cleanup); + tst_sig(FORK, sighandler, cleanup); do_child(); } @@ -222,7 +231,7 @@ void do_child_uclinux() void setup(void) { /* capture signals in our own handler */ - tst_sig(FORK, SIG_IGN, cleanup); + tst_sig(FORK, sighandler, cleanup); /* Set up the expected error numbers for -e option */ TEST_EXP_ENOS(exp_enos); hooks/post-receive -- ltp |