]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nptl/eintr.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / nptl / eintr.c
index 3c6cff2f3714a132150f715dce7f3d7e43c4eb9f..5f5d358763d039bea62f6c17f7e99ce8adb76ac7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
 #include <signal.h>
 #include <unistd.h>
+#include <support/xthread.h>
+#include <support/xsignal.h>
+#include <support/xthread.h>
 
 
 static int the_sig;
@@ -46,7 +49,7 @@ eintr_source (void *arg)
       sigset_t ss;
       sigemptyset (&ss);
       sigaddset (&ss, the_sig);
-      pthread_sigmask (SIG_BLOCK, &ss, NULL);
+      xpthread_sigmask (SIG_BLOCK, &ss, NULL);
     }
 
   while (1)
@@ -79,10 +82,5 @@ setup_eintr (int sig, pthread_t *thp)
   the_sig = sig;
 
   /* Create the thread which will fire off the signals.  */
-  pthread_t th;
-  if (pthread_create (&th, NULL, eintr_source, thp) != 0)
-    {
-      puts ("setup_eintr: pthread_create failed");
-      exit (1);
-    }
+  xpthread_create (NULL, eintr_source, thp);
 }