]> git.ipfire.org Git - thirdparty/coreutils.git/commit
sort: use pthread_sigmask, not sigprocmask
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Aug 2017 16:28:59 +0000 (09:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Aug 2017 19:03:03 +0000 (12:03 -0700)
commit1a210762d5bf269bea5eabd309a119585a912d6d
tree56a7b2c6e49293be059431b07acae3e392309558
parentdae474bf9ba16b674b3a53e9d7ebaadd9663516a
sort: use pthread_sigmask, not sigprocmask

POSIX says sigprocmask has unspecified behavior in a multithreaded
program like ‘sort’.
* src/sort.c (pthread_sigmask) [GNULIB_defined_pthread_functions]:
New macro, for use when ‘sort’ is not multithreaded.
(cs_enter, cs_leave): Use it.  Pass address, not value, as
this is typically a tad faster.  All callers changed.
src/sort.c