commit | 784eb9c2d2cbd8ec49ff40dbaba17f4407f3b85a | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Tue Oct 14 14:16:34 2014 -0500 |
committer | Rob Landley <rob@landley.net> | Tue Oct 14 14:16:34 2014 -0500 |
tree | 56c9c74095322626deecff444d10f2d706a32306 | |
parent | 1796626d9e7a4df3705ef83dbf278d248756692b [diff] [blame] |
Use O_CLOEXEC instead of O_RDONLY to signal loopfiles_rw() to close filehandles.
diff --git a/toys/posix/cmp.c b/toys/posix/cmp.c index 13990d4..2dae113 100644 --- a/toys/posix/cmp.c +++ b/toys/posix/cmp.c
@@ -79,6 +79,6 @@ void cmp_main(void) { - loopfiles_rw(toys.optargs, O_RDONLY, 0, toys.optflags&FLAG_s, do_cmp); + loopfiles_rw(toys.optargs, O_CLOEXEC, 0, toys.optflags&FLAG_s, do_cmp); }