summaryrefslogtreecommitdiffstats
path: root/scripts/git-hooks/commit-msg
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-08-17 08:03:57 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-08-17 12:03:03 -0700
commit717f1d02e1707b18271a83812989e778c6f5cb77 (patch)
tree31a9b682db5874ea362546e5ebbe23278589331c /scripts/git-hooks/commit-msg
parent72f1751f6075b036e055a39c8abbbddac6c225c7 (diff)
downloadcoreutils-717f1d02e1707b18271a83812989e778c6f5cb77.tar.gz
coreutils-717f1d02e1707b18271a83812989e778c6f5cb77.zip
sort: file descriptor discipline
Use O_CLOEXEC when creating file descriptors, so that subsidiary processes do not inherit file descriptors that they do not need. This is helpful for ‘sort’, as it is a multithreaded program that forks and execs. * bootstrap.conf (gnulib_modules): Add mkostemp, open, pipe2. * src/sort.c (create_temp_file): Open temporary file with O_CLOEXEC. (stream_open): Open the stream with O_CLOEXEC. (pipe_fork): Create the pipe with O_CLOEXEC. (check_output): Open the output file with O_CLOEXEC. (main): Use xfopen/xfclose to handle --files0-from, so that O_CLOEXEC is used properly. This is simpler anyway. * tests/misc/sort-files0-from.pl: Adjust to change in diagnostic wording.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions