summaryrefslogtreecommitdiff
path: root/libraries/base/include
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-02-19 11:42:17 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-02-19 11:42:17 +0000
commit3c642ac71e3a4c007442a4f2f6a189908d538b33 (patch)
treed2dad5d5af7951eb3b1c99ae73f2fe89aa2a8a0e /libraries/base/include
parent1d266a9471f0ad0c6b7faca2cfa4402a9f39932a (diff)
downloadhaskell-3c642ac71e3a4c007442a4f2f6a189908d538b33.tar.gz
Set the IO manager pipe descriptors to FD_CLOEXEC
This pipe is an internal implementation detail, we don't really want it to be exposed.
Diffstat (limited to 'libraries/base/include')
-rw-r--r--libraries/base/include/HsBase.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h
index 862cf44e75..9bbbdc8f22 100644
--- a/libraries/base/include/HsBase.h
+++ b/libraries/base/include/HsBase.h
@@ -659,6 +659,26 @@ __hscore_f_setfl( void )
#endif
}
+INLINE int
+__hscore_f_setfd( void )
+{
+#ifdef F_SETFD
+ return F_SETFD;
+#else
+ return 0;
+#endif
+}
+
+INLINE long
+__hscore_fd_cloexec( void )
+{
+#ifdef FD_CLOEXEC
+ return FD_CLOEXEC;
+#else
+ return 0;
+#endif
+}
+
// defined in rts/RtsStartup.c.
extern void* __hscore_get_saved_termios(int fd);
extern void __hscore_set_saved_termios(int fd, void* ts);