* fhandler_console.cc (fhandler_console::dup): Only set ctty when we haven't
specifically called setsid. * fhandler_tty.cc (fhandler_pty_slave::dup): Ditto. Also add comment documenting research into rxvt problem. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Don't check specifically for myself->ctty == -1. Test for > 0 as that is the correct test. (fhandler_termios::sigflush): Ditto.
This commit is contained in:
@@ -99,7 +99,7 @@ fhandler_termios::tcsetpgrp (const pid_t pgid)
|
||||
int
|
||||
fhandler_termios::tcgetpgrp ()
|
||||
{
|
||||
if (myself->ctty != -1 && myself->ctty == tc ()->ntty)
|
||||
if (myself->ctty > 0 && myself->ctty == tc ()->ntty)
|
||||
return tc ()->pgid;
|
||||
set_errno (ENOTTY);
|
||||
return -1;
|
||||
@@ -404,7 +404,7 @@ fhandler_termios::sigflush ()
|
||||
pid_t
|
||||
fhandler_termios::tcgetsid ()
|
||||
{
|
||||
if (myself->ctty != -1 && myself->ctty == tc ()->ntty)
|
||||
if (myself->ctty > 0 && myself->ctty == tc ()->ntty)
|
||||
return tc ()->getsid ();
|
||||
set_errno (ENOTTY);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user