* dtable.cc (dtable::stdio_init): Always initialize console when we have one.

* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Use a better method to
print tty name for debugging.
(fhandler_termios::bg_check): Ditto.
* pinfo.cc (_pinfo::set_ctty): Remove leftover debugging stuff.  Simplify
behavior when setting tty's sid and pgid to avoid overwriting previously set
values.
* spawn.cc (ch_spawn): Cosmetic change.
This commit is contained in:
Christopher Faylor
2012-01-08 06:24:17 +00:00
parent 04243e461d
commit a345dc55f9
5 changed files with 32 additions and 33 deletions

View File

@ -62,7 +62,7 @@ fhandler_termios::tcinit (bool is_pty_master)
int
fhandler_termios::tcsetpgrp (const pid_t pgid)
{
termios_printf ("tty %d pgid %d, sid %d, tsid %d", tc ()->ntty, pgid,
termios_printf ("%s, pgid %d, sid %d, tsid %d", tc ()->ttyname (), pgid,
myself->sid, tc ()->getsid ());
if (myself->sid != tc ()->getsid ())
{
@ -168,8 +168,8 @@ fhandler_termios::bg_check (int sig)
if (sig < 0)
sig = -sig;
termios_printf ("bg I/O pgid %d, tpgid %d, %s, ntty %s", myself->pgid, tc ()->getpgid (),
myctty (), tc ()->ttyname ());
termios_printf ("%s, bg I/O pgid %d, tpgid %d, myctty %s", tc ()->ttyname (),
myself->pgid, tc ()->getpgid (), myctty ());
if (tc ()->getsid () == 0)
{