1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Add O_CLOEXEC to flopen

Requested by:	jilles
This commit is contained in:
Baptiste Daroussin 2012-12-27 20:24:44 +00:00
parent b3075010f8
commit ede89d5db2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244744
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ gr_lock(void)
for (;;) {
struct stat st;
lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK, 0);
lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
if (lockfd == -1) {
if (errno == EWOULDBLOCK) {
errx(1, "the group file is busy");

View File

@ -179,7 +179,7 @@ pw_lock(void)
for (;;) {
struct stat st;
lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK, 0);
lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
if (lockfd == -1) {
if (errno == EWOULDBLOCK) {
errx(1, "the password db file is busy");