Index: ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c,v retrieving revision 1.3 diff -u -r1.3 4-3.c --- ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c 3 Jun 2005 16:31:46 -0000 1.3 +++ ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c 4 Sep 2009 00:51:35 -0000 @@ -258,16 +258,6 @@ /* Initialize thread attribute objects */ scenar_init(); - /* We need to register the signal handlers for the PROCESS */ - sigemptyset (&sa.sa_mask); - sa.sa_flags = 0; - sa.sa_handler = sighdl1; - if ((ret = sigaction (SIGUSR1, &sa, NULL))) - { UNRESOLVED(ret, "Unable to register signal handler1"); } - sa.sa_handler = sighdl2; - if ((ret = sigaction (SIGUSR2, &sa, NULL))) - { UNRESOLVED(ret, "Unable to register signal handler2"); } - /* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */ sigemptyset(&usersigs); ret = sigaddset(&usersigs, SIGUSR1); @@ -285,6 +275,16 @@ { UNRESOLVED(errno, "Semsig2 init"); } #endif + /* We need to register the signal handlers for the PROCESS */ + sigemptyset (&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = sighdl1; + if ((ret = sigaction (SIGUSR1, &sa, NULL))) + { UNRESOLVED(ret, "Unable to register signal handler1"); } + sa.sa_handler = sighdl2; + if ((ret = sigaction (SIGUSR2, &sa, NULL))) + { UNRESOLVED(ret, "Unable to register signal handler2"); } + if ((ret = pthread_create(&th_work, NULL, test, NULL))) { UNRESOLVED(ret, "Worker thread creation failed"); } Index: ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c,v retrieving revision 1.1 diff -u -r1.1 5-1.c --- ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c 3 Jun 2005 16:32:47 -0000 1.1 +++ ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c 4 Sep 2009 00:51:35 -0000 @@ -224,23 +224,6 @@ /* Initialize output routine */ output_init(); - /* We need to register the signal handlers for the PROCESS */ - sigemptyset ( &sa.sa_mask ); - sa.sa_flags = 0; - sa.sa_handler = sighdl1; - - if ( ( ret = sigaction ( SIGUSR1, &sa, NULL ) ) ) - { - UNRESOLVED( ret, "Unable to register signal handler1" ); - } - - sa.sa_handler = sighdl2; - - if ( ( ret = sigaction ( SIGUSR2, &sa, NULL ) ) ) - { - UNRESOLVED( ret, "Unable to register signal handler2" ); - } - /* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */ sigemptyset( &usersigs ); @@ -274,6 +257,23 @@ #endif + /* We need to register the signal handlers for the PROCESS */ + sigemptyset ( &sa.sa_mask ); + sa.sa_flags = 0; + sa.sa_handler = sighdl1; + + if ( ( ret = sigaction ( SIGUSR1, &sa, NULL ) ) ) + { + UNRESOLVED( ret, "Unable to register signal handler1" ); + } + + sa.sa_handler = sighdl2; + + if ( ( ret = sigaction ( SIGUSR2, &sa, NULL ) ) ) + { + UNRESOLVED( ret, "Unable to register signal handler2" ); + } + me = pthread_self(); if ( ( ret = pthread_create( &th_work, NULL, test, &me ) ) )