projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cbdf3f
)
Close each descriptor immediately so the test
author
Jim Meyering
<jim@meyering.net>
Mon, 19 Nov 2001 09:56:29 +0000
(09:56 +0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 19 Nov 2001 09:56:29 +0000
(09:56 +0000)
doesn't mistakenly hit the max-open-files limit.
m4/mkstemp.m4
patch
|
blob
|
history
diff --git
a/m4/mkstemp.m4
b/m4/mkstemp.m4
index 21bcc381d3c56ecf3b55c637899778a641221de8..a7c12d8891b8e5d08eed48b4a199e866fff4d6be 100644
(file)
--- 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);
}