]> git.ipfire.org Git - thirdparty/systemd.git/commit
pager: let's create pager fds with O_CLOEXEC first 6810/head
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Sep 2017 08:35:28 +0000 (10:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Sep 2017 08:37:52 +0000 (10:37 +0200)
commitd262e99e39f4b717a2866f7cdf45ac45a241093f
tree826df38231c628487b962d5fdcd0d09a03e107aa
parentdea374e898a749a0474b72b2015cca9009b1432b
pager: let's create pager fds with O_CLOEXEC first

We make copies (without O_CLOEXEC) of the fds anyway before using them,
hence let's be safe and create them with O_CLOEXEC first, so that we
don't run into issues should pager_open() be called in a threaded
environment where another thread fork()s at the wrong time and ends up
with fds not marked O_CLOEXEC.
src/shared/pager.c