diff options
author | Roland McGrath <roland@hack.frob.com> | 2015-02-06 12:30:05 -0800 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2015-02-06 12:30:05 -0800 |
commit | 62ad2abcd6fbcb90cc9f0eea7cf011b83f5e95e2 (patch) | |
tree | 304537842647ec91c546ae2d28237b0fca48d269 | |
parent | cfa69b0bb23b69087b5619a76d52eba8743cbbb2 (diff) | |
download | glibc-62ad2abcd6fbcb90cc9f0eea7cf011b83f5e95e2.tar glibc-62ad2abcd6fbcb90cc9f0eea7cf011b83f5e95e2.tar.gz glibc-62ad2abcd6fbcb90cc9f0eea7cf011b83f5e95e2.tar.bz2 glibc-62ad2abcd6fbcb90cc9f0eea7cf011b83f5e95e2.zip |
Use signal rather than sigaction in nptl/tst-cleanup2.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | nptl/tst-cleanup2.c | 11 |
2 files changed, 6 insertions, 8 deletions
@@ -1,5 +1,8 @@ 2015-02-06 Roland McGrath <roland@hack.frob.com> + * nptl/tst-cleanup2.c (do_test): Use signal rather than sigaction. + Drop trailing \n from perror argument. Use return rather than exit. + * nptl/tst-cancel20.c (do_test): Conditionalize SA_SIGINFO-using tests on [SA_SIGINFO]. * nptl/tst-cancel21.c (do_test): Likewise. diff --git a/nptl/tst-cleanup2.c b/nptl/tst-cleanup2.c index 8a524de869..9e5a9570a4 100644 --- a/nptl/tst-cleanup2.c +++ b/nptl/tst-cleanup2.c @@ -40,16 +40,11 @@ do_test (void) array. Mark the return value as volatile so that it gets reloaded on return. */ volatile int ret = 0; - struct sigaction sa; - sa.sa_handler = sig_handler; - sigemptyset (&sa.sa_mask); - sa.sa_flags = SA_SIGINFO; - - if (sigaction (SIGSEGV, &sa, 0)) + if (signal (SIGSEGV, &sig_handler) == SIG_ERR) { - perror ("installing SIGSEGV handler\n"); - exit (1); + perror ("installing SIGSEGV handler"); + return 1; } puts ("Attempting to sprintf to null ptr"); |