mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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_6@13220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a18125cfc8
commit
679e43eccb
2 changed files with 5 additions and 2 deletions
|
|
@ -200,7 +200,7 @@ establishShell(argc, argv, info)
|
|||
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 @@ 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;
|
||||
|
|
@ -353,6 +355,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-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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue