From: Jim Meyering Date: Mon, 19 Nov 2001 09:56:29 +0000 (+0000) Subject: Close each descriptor immediately so the test X-Git-Tag: cvs-readonly~5543 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=fb687fad4c51f1514db604ea9a2eca2d7b6dfea2;p=gnulib.git Close each descriptor immediately so the test doesn't mistakenly hit the max-open-files limit. --- diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 index 21bcc381d..a7c12d889 100644 --- a/m4/mkstemp.m4 +++ b/m4/mkstemp.m4 @@ -26,8 +26,10 @@ AC_DEFUN([UTILS_FUNC_MKSTEMP], for (i = 0; i < 30; i++) { char template[] = "$utils_tmpdir_mkstemp/aXXXXXX"; - if (mkstemp (template) == -1) + int fd = mkstemp (template); + if (fd == -1) exit (1); + close (fd); } exit (0); }