ruby-changes:1730
From: ko1@a...
Date: 22 Aug 2007 12:38:50 +0900
Subject: [ruby-changes:1730] shyouhei - Ruby:r13220 (ruby_1_8_6): * ext/pty/pty.c (establishShell): handshaking before close slave
shyouhei 2007-08-22 12:38:42 +0900 (Wed, 22 Aug 2007)
New Revision: 13220
Modified files:
branches/ruby_1_8_6/ext/pty/pty.c
branches/ruby_1_8_6/version.h
Log:
* ext/pty/pty.c (establishShell): handshaking before close slave
device. [ruby-talk:263410]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=13220&r2=13219
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ext/pty/pty.c?r1=13220&r2=13219
Index: ruby_1_8_6/ext/pty/pty.c
===================================================================
--- ruby_1_8_6/ext/pty/pty.c (revision 13219)
+++ ruby_1_8_6/ext/pty/pty.c (revision 13220)
@@ -200,7 +200,7 @@
struct pty_info *info;
{
int i,master,slave;
- char *p,*getenv();
+ char *p, tmp, *getenv();
struct passwd *pwent;
VALUE v;
struct exec_info arg;
@@ -273,6 +273,7 @@
}
close(master);
#endif
+ write(slave, "", 1);
dup2(slave,0);
dup2(slave,1);
dup2(slave,2);
@@ -288,6 +289,7 @@
_exit(1);
}
+ read(master, &tmp, 1);
close(slave);
info->child_pid = i;
@@ -353,6 +355,7 @@
#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;
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h (revision 13219)
+++ ruby_1_8_6/version.h (revision 13220)
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-22"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070822
-#define RUBY_PATCHLEVEL 86
+#define RUBY_PATCHLEVEL 87
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml