]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
jilles pointed out that O_CLOEXEC could be used in the open(2) flags
authorghelmer <ghelmer@FreeBSD.org>
Wed, 11 Jan 2012 16:35:26 +0000 (16:35 +0000)
committerghelmer <ghelmer@FreeBSD.org>
Wed, 11 Jan 2012 16:35:26 +0000 (16:35 +0000)
commit5f5cbaa5f6d44d5f62a291801325f3d3e6896b06
tree94e62c2d6a53bd454f708567e70912052b5a7774
parenta2848bd240339bb07b647bb82bc7a4043e977d3f
jilles pointed out that O_CLOEXEC could be used in the open(2) flags
rather than using fcntl(2) later, and in addition to saving a system
call, removes a possible race with fork/exec from threads or signal
handlers.
lib/libutil/pidfile.c