summaryrefslogtreecommitdiff
path: root/libc/stdio/tmpfile.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-10-17 14:25:01 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-10-17 14:25:01 -0700
commit9a737ab7a40984cfdfffd014562a220a3736a10f (patch)
tree51fe4682638ffec59b2bd41d67df82ec60d6b48d /libc/stdio/tmpfile.c
parentcfbc0081078b5a41895a2ad689627bf94eeacb43 (diff)
use *_not_cancel variants to avoid accidental cancellations with nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
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;
}