]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: avoid calling exit() from signal handlers
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 13 May 2016 09:28:51 +0000 (11:28 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 13 May 2016 09:28:51 +0000 (11:28 +0200)
tests/no-signal.c
tests/slow/cipher-test.c
tests/slow/hash-large.c

index 00a2f040dbcc89e4212d5d3ca79d8477335841ea..2fe2927368f6cfeea419b02a923853075091b5d1 100644 (file)
@@ -59,8 +59,7 @@ int main()
 static
 void sigpipe(int sig)
 {
-       fail("sigpipe received\n");
-       exit(1);
+       _exit(2);
 }
 
 #define BUF_SIZE 64
index e58cb3562c34c37ec7968e158a716dc601faf98a..6aa5811dc3af56f63ba9cd94b0fe1b7a1f7a92b0 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
 
 static void handle_sigill(int sig)
 {
-       exit(0);
+       _exit(0);
 }
 
 static void tls_log_func(int level, const char *str)
index 39abb090fccd7db436abcfed1b2dbcfca1c150f4..7c00b9e6221035dff0ed11cb199d19b386c815bc 100644 (file)
@@ -43,7 +43,7 @@ void doit(void)
 
 static void exit_77(int signo)
 {
-       exit(77);
+       _exit(77);
 }
 #endif