path: root/src/basic/exec-util.c
diff options
authorLennart Poettering <>2017-12-24 00:54:40 +0100
committerSven Eden <>2018-05-30 07:49:43 +0200
commit7cfc65cbfb5fb2e06710cab0d5008a0643735d49 (patch)
treead34892ce3259114efd3c2a89d099cc4007c6524 /src/basic/exec-util.c
parentcef2ebd7970895b0d1186bf5f6b8cbe0ee455ff4 (diff)
terminal-util: open /dev/null with O_CLOEXEC in make_stdio_null()
Ultimately, O_CLOEXEC should be off in fd 0, 1, 2, but when we open /dev/null here it's unlikely to be < 0, and after dupping the fd to 0, 1, 2 we turn off O_CLOEXEC explicitly anyway. Unless we know that what we are about to open will return 0, 1 or 2 we should always set O_CLOEXEC in order to be safe to other threads forking of subprocesses at the wrong moment.
Diffstat (limited to 'src/basic/exec-util.c')
0 files changed, 0 insertions, 0 deletions