diff options
author | jilles <jilles@FreeBSD.org> | 2013-05-05 10:51:40 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-05-05 10:51:40 +0000 |
commit | 135786413b1346f647980e2c338087f41e2735a2 (patch) | |
tree | daf1ba66bada98a9f310e8dfed5331cec9dd46cd /bin/sh/main.c | |
parent | 42b8c0012b80efc0b1d1bacb9d5c45afd8a51301 (diff) | |
download | FreeBSD-src-135786413b1346f647980e2c338087f41e2735a2.zip FreeBSD-src-135786413b1346f647980e2c338087f41e2735a2.tar.gz |
sh: Use O_CLOEXEC and F_DUPFD_CLOEXEC instead of separate fcntl() call.
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r-- | bin/sh/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c index 84a1ef2..ffe8a61 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -248,7 +248,7 @@ read_profile(const char *name) if (expandedname == NULL) return; INTOFF; - if ((fd = open(expandedname, O_RDONLY)) >= 0) + if ((fd = open(expandedname, O_RDONLY | O_CLOEXEC)) >= 0) setinputfd(fd, 1); INTON; if (fd < 0) |