summaryrefslogtreecommitdiff
path: root/libc/stdio/tmpfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/tmpfile.c')
-rw-r--r--libc/stdio/tmpfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdio/tmpfile.c b/libc/stdio/tmpfile.c
index 2f973c329..57f252715 100644
--- a/libc/stdio/tmpfile.c
+++ b/libc/stdio/tmpfile.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <unistd.h>
#include "../misc/internals/tempname.h"
+#include <not-cancel.h>
/* This returns a new stream opened on a temporary file (generated
@@ -43,7 +44,7 @@ FILE * tmpfile (void)
(void) remove (buf);
if ((f = fdopen (fd, "w+b")) == NULL)
- close (fd);
+ close_not_cancel (fd);
return f;
}