diff options
author | jilles <jilles@FreeBSD.org> | 2012-09-26 20:16:15 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-09-26 20:16:15 +0000 |
commit | 93b351eaa9d39f5c5e7446be29cf65d16180193f (patch) | |
tree | 34ef27283c0670dfc3b8ad89fab49306fbdc6e76 /usr.bin | |
parent | 99ed11b97d20806dd7a7c8ef3162cf72cc36dd75 (diff) | |
download | FreeBSD-src-93b351eaa9d39f5c5e7446be29cf65d16180193f.zip FreeBSD-src-93b351eaa9d39f5c5e7446be29cf65d16180193f.tar.gz |
find: Do not pass fd to save current directory to child processes.
This removes one of the two wrongly passed file descriptors. The other one
appears to be from fts(3).
MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/find/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index b182557..6284413 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -151,7 +151,7 @@ main(int argc, char *argv[]) usage(); *p = NULL; - if ((dotfd = open(".", O_RDONLY, 0)) < 0) + if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) err(1, "."); exit(find_execute(find_formplan(argv), start)); |