remove_sigsetmark.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. simpleinit: remove deprecated sigsetmask()
  2. The sigsetmask() is deprecated in favor of sigprocmask().
  3. This is not needed upstream since simpleinit is removed from
  4. util-linux-ng master
  5. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  6. Upstream-Status: Inappropriate
  7. Index: util-linux-2.19.1/simpleinit/shutdown.c
  8. ===================================================================
  9. --- util-linux-2.19.1.orig/simpleinit/shutdown.c 2011-03-04 03:47:47.000000000 -0800
  10. +++ util-linux-2.19.1/simpleinit/shutdown.c 2011-07-06 08:43:39.183849752 -0700
  11. @@ -145,7 +145,7 @@
  12. {
  13. int c, i, fd;
  14. char *ptr;
  15. -
  16. + sigset_t sigmask;
  17. i = getdtablesize ();
  18. for (fd = 3; fd < i; fd++) close (fd);
  19. if (getpid () == 1)
  20. @@ -153,7 +153,9 @@
  21. for (fd = 0; fd < 3; fd++) close (fd);
  22. while (1) wait (NULL); /* Grim reaper never stops */
  23. }
  24. - sigsetmask (0); /* simpleinit(8) blocks all signals: undo for ALRM */
  25. + /* simpleinit(8) blocks all signals: undo for ALRM */
  26. + sigemptyset(&sigmask);
  27. + sigprocmask (SIG_SETMASK, &sigmask, NULL);
  28. for (i = 1; i < NSIG; i++) signal (i, SIG_DFL);
  29. setlocale(LC_ALL, "");