From 3ee8d957ec6cb8c6a3c1bb01572ae94e53087bde Mon Sep 17 00:00:00 2001 From: KOSAKI Motohiro Date: Fri, 26 Mar 2010 23:32:13 +0900 Subject: [PATCH] O_CLOEXEC --- io.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/io.c b/io.c index 031a92b..f53cae5 100644 --- a/io.c +++ b/io.c @@ -10004,6 +10004,10 @@ Init_IO(void) /* do not change atime */ rb_file_const("NOATIME", INT2FIX(O_NOATIME)); /* Linux */ #endif +#ifdef O_CLOEXEC + /* enable the close-on-exec flag */ + rb_file_const("CLOEXEC", INT2FIX(O_CLOEXEC)); /* Linux */ +#endif sym_mode = ID2SYM(rb_intern("mode")); sym_perm = ID2SYM(rb_intern("perm")); -- 1.6.6