summaryrefslogtreecommitdiff
path: root/libguile/threads.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-06-16 18:27:57 +0200
committerAndy Wingo <wingo@pobox.com>2011-06-16 19:47:26 +0200
commit32f94bf258bd032fa6f96fc76e4153086bc001f5 (patch)
tree3aeb6051c35e2efc8033018d99a0d2539893f939 /libguile/threads.c
parent3d458a81c64e4696157b23c7c4c4c150aa4a93b8 (diff)
downloadguile-32f94bf258bd032fa6f96fc76e4153086bc001f5.tar.gz
O_CLOEXEC usage
* libguile/objcodes.c (scm_load_objcode): * libguile/scmsigs.c (start_signal_delivery_thread): * libguile/threads.c (guilify_self_1): Use O_CLOEXEC.
Diffstat (limited to 'libguile/threads.c')
-rw-r--r--libguile/threads.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libguile/threads.c b/libguile/threads.c
index 97d9f6497..dba5d16f1 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -39,6 +39,7 @@
#endif
#include <assert.h>
+#include <fcntl.h>
#include <nproc.h>
#include "libguile/validate.h"
@@ -57,15 +58,6 @@
#include "libguile/strings.h"
#include "libguile/weaks.h"
-#ifdef __MINGW32__
-#ifndef ETIMEDOUT
-# define ETIMEDOUT WSAETIMEDOUT
-#endif
-# include <fcntl.h>
-# include <process.h>
-# define pipe(fd) _pipe (fd, 256, O_BINARY)
-#endif /* __MINGW32__ */
-
#include <full-read.h>
@@ -538,7 +530,7 @@ guilify_self_1 (struct GC_stack_base *base)
t.sleep_object = SCM_BOOL_F;
t.sleep_fd = -1;
- if (pipe (t.sleep_pipe) != 0)
+ if (pipe2 (t.sleep_pipe, O_CLOEXEC) != 0)
/* FIXME: Error conditions during the initialization phase are handled
gracelessly since public functions such as `scm_init_guile ()'
currently have type `void'. */