summaryrefslogtreecommitdiff
path: root/ext/pty/pty.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-31 12:49:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-31 12:49:16 +0000
commit1a70dfe6f4750a577b889a568527a07ed540d43c (patch)
tree11a9bd06f5fff7d9e3df7397f50f4ee1754ea9c6 /ext/pty/pty.c
parent6533f070ba616662b7ab7504f7bc2a0827394a89 (diff)
* include/ruby/intern.h (rb_fd_fix_cloexec): renamed from
rb_fd_set_cloexec. * io.c: follow the above renaming. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty/pty.c')
-rw-r--r--ext/pty/pty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 98993f7..353e1fa 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -296,7 +296,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
if ((masterfd = posix_openpt(O_RDWR|O_NOCTTY)) == -1) goto error;
if (sigaction(SIGCHLD, &dfl, &old) == -1) goto error;
if (grantpt(masterfd) == -1) goto grantpt_error;
- rb_fd_set_cloexec(masterfd);
+ rb_fd_fix_cloexec(masterfd);
#else
flags = O_RDWR|O_NOCTTY;
# ifdef O_CLOEXEC
@@ -306,7 +306,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
flags |= O_CLOEXEC;
# endif
if ((masterfd = posix_openpt(flags)) == -1) goto error;
- rb_fd_set_cloexec(masterfd);
+ rb_fd_fix_cloexec(masterfd);
if (sigaction(SIGCHLD, &dfl, &old) == -1) goto error;
if (grantpt(masterfd) == -1) goto grantpt_error;
#endif
@@ -347,8 +347,8 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
if (!fail) return -1;
rb_raise(rb_eRuntimeError, "openpty() failed");
}
- rb_fd_set_cloexec(*master);
- rb_fd_set_cloexec(*slave);
+ rb_fd_fix_cloexec(*master);
+ rb_fd_fix_cloexec(*slave);
if (no_mesg(SlaveName, nomesg) == -1) {
if (!fail) return -1;
rb_raise(rb_eRuntimeError, "can't chmod slave pty");
@@ -365,7 +365,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
if (!fail) return -1;
rb_raise(rb_eRuntimeError, "_getpty() failed");
}
- rb_fd_set_cloexec(*master);
+ rb_fd_fix_cloexec(*master);
*slave = rb_cloexec_open(name, O_RDWR, 0);
/* error check? */
@@ -387,7 +387,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
if((masterfd = open("/dev/ptmx", O_RDWR, 0)) == -1) goto error;
s = signal(SIGCHLD, SIG_DFL);
if(grantpt(masterfd) == -1) goto error;
- rb_fd_set_cloexec(masterfd);
+ rb_fd_fix_cloexec(masterfd);
#else
if((masterfd = rb_cloexec_open("/dev/ptmx", O_RDWR, 0)) == -1) goto error;
rb_update_max_fd(masterfd);