]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.threads/sigstep-threads.c
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.threads / sigstep-threads.c
index 7e04c32934f9e8c75373825bf377662bcc1de332..7f85fb9c01777f15b0fc9e5d93ad952571988441 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010 Free Software Foundation, Inc.
+   Copyright 2010-2013 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -36,10 +36,8 @@ handler (int signo)  /* step-0 */
 static void *
 start (void *arg)
 {
-  signal (SIGUSR1, handler);
   tgkill (getpid (), gettid (), SIGUSR1);
   assert (0);
-
   return NULL;
 }
 
@@ -48,6 +46,8 @@ main (void)
 {
   pthread_t thread;
 
+  signal (SIGUSR1, handler);
+
   pthread_create (&thread, NULL, start, NULL);
   start (NULL);        /* main-start */
   return 0;