summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-21 22:01:43 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:40 +0200
commitf9af28c64eaf09cd9daba0445cb04f7d28e3d792 (patch)
tree1336518ca133ea38666c7c3b574641f478cf6317 /libc
parent2d9054b39afa83825168c21ef8266c6c2ae82c3e (diff)
creat*.c: add LIBC_CANCEL_HANDLED to know that it is cancellable (handled by open)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/creat.c3
-rw-r--r--libc/sysdeps/linux/common/creat64.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/creat.c b/libc/sysdeps/linux/common/creat.c
index 77cf44e69..17929193e 100644
--- a/libc/sysdeps/linux/common/creat.c
+++ b/libc/sysdeps/linux/common/creat.c
@@ -8,8 +8,11 @@
*/
#include <fcntl.h>
+#include <cancel.h>
int creat(const char *file, mode_t mode)
{
return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
}
+/* open handled cancellation, noop on uClibc */
+LIBC_CANCEL_HANDLED();
diff --git a/libc/sysdeps/linux/common/creat64.c b/libc/sysdeps/linux/common/creat64.c
index 550e88aab..5010d767d 100644
--- a/libc/sysdeps/linux/common/creat64.c
+++ b/libc/sysdeps/linux/common/creat64.c
@@ -18,9 +18,12 @@
#include <_lfs_64.h>
#include <fcntl.h>
+#include <cancel.h>
/* Create FILE with protections MODE. */
int creat64(const char *file, mode_t mode)
{
- return open64(file, O_WRONLY|O_CREAT|O_TRUNC, mode);
+ return open64(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
}
+/* open handled cancellation, noop on uClibc */
+LIBC_CANCEL_HANDLED();