From d3e438d54ff05a3678f712bacf5c702ebf7b2a06 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 22 Apr 2001 03:16:04 +0000 Subject: a couple of minor merges from 2_2 (This used to be commit 67aa587eb2ee9044574ee212dfd7d52895f868c0) --- source3/client/smbmount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/client/smbmount.c') diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 7da96ba8c3..a121d1fa22 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -95,10 +95,12 @@ static void daemonize(void) static void close_our_files(int client_fd) { int i; + struct rlimit limits; getrlimit(RLIMIT_NOFILE,&limits); - for (1 = 0; i< limits.rlim_max, i++) { - if (i == client_fd) continue; + for (i = 0; i< limits.rlim_max; i++) { + if (i == client_fd) + continue; close(i); } } -- cgit