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
This commit is contained in:
parent
80cd7c7596
commit
bedab466ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240973
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user