ruby-changes:21502
From: akr <ko1@a...>
Date: Sat, 29 Oct 2011 14:27:43 +0900 (JST)
Subject: [ruby-changes:21502] akr:r33551 (trunk): * io.c (rb_cloexec_open): use O_CLOEXEC if available.
akr 2011-10-29 14:27:32 +0900 (Sat, 29 Oct 2011) New Revision: 33551 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33551 Log: * io.c (rb_cloexec_open): use O_CLOEXEC if available. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33550) +++ ChangeLog (revision 33551) @@ -1,3 +1,7 @@ +Sat Oct 29 14:26:56 2011 Tanaka Akira <akr@f...> + + * io.c (rb_cloexec_open): use O_CLOEXEC if available. + Sat Oct 29 12:57:15 2011 Tanaka Akira <akr@f...> * process.c (ruby_setsid): use rb_cloexec_open. Index: io.c =================================================================== --- io.c (revision 33550) +++ io.c (revision 33551) @@ -191,6 +191,9 @@ rb_cloexec_open(const char *pathname, int flags, mode_t mode) { int ret; +#ifdef O_CLOEXEC + flags |= O_CLOEXEC; +#endif ret = open(pathname, flags, mode); if (ret == -1) return -1; fd_set_cloexec(ret); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/