diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 23:41:13 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 23:41:13 +0000 |
commit | d0fba5f32c3aae53dfbb7a15eac6ba795a86f5da (patch) | |
tree | facce2e77f8fa2c1e254cc03743fe4d7cbf9d30b | |
parent | 7aee73b25716e1bc66774e3debc9170055fe8ada (diff) |
* ext/pty/pty.c (establishShell): handshaking before close slave
device. [ruby-talk:263410]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@13053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/pty/pty.c | 5 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Thu Aug 16 08:40:38 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/pty/pty.c (establishShell): handshaking before close slave + device. [ruby-talk:263410] + Thu Aug 16 08:29:39 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in (ac_cv_func_isinf): set yes also on OpenSolaris. diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 626898ae76..93fb5c0118 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -197,7 +197,7 @@ establishShell(argc, argv, info) struct pty_info *info; { static int i,master,slave,currentPid; - char *p,*getenv(); + char *p, tmp, *getenv(); struct passwd *pwent; VALUE v; struct exec_info arg; @@ -273,6 +273,7 @@ establishShell(argc, argv, info) } close(master); #endif + write(slave, "", 1); dup2(slave,0); dup2(slave,1); dup2(slave,2); @@ -288,6 +289,7 @@ establishShell(argc, argv, info) _exit(1); } + read(master, &tmp, 1); close(slave); info->child_pid = i; @@ -354,6 +356,7 @@ get_device_once(master, slave, fail) #if defined I_PUSH && !defined linux if(ioctl(j, I_PUSH, "ptem") != -1) { if(ioctl(j, I_PUSH, "ldterm") != -1) { + ioctl(j, I_PUSH, "ttcompat"); #endif *master = i; *slave = j; @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2007-08-16" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20070816 -#define RUBY_PATCHLEVEL 94 +#define RUBY_PATCHLEVEL 95 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |