From 784eb9c2d2cbd8ec49ff40dbaba17f4407f3b85a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 14 Oct 2014 14:16:34 -0500 Subject: Use O_CLOEXEC instead of O_RDONLY to signal loopfiles_rw() to close filehandles. --- toys/posix/cmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix') diff --git a/toys/posix/cmp.c b/toys/posix/cmp.c index 13990d45..2dae1138 100644 --- a/toys/posix/cmp.c +++ b/toys/posix/cmp.c @@ -79,6 +79,6 @@ out: 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); } -- cgit v1.2.3