fixed mbsebbs start bug without controlling tty

This commit is contained in:
Michiel Broek
2001-10-20 14:08:44 +00:00
parent a8778d72d5
commit d19b24f6e4
3 changed files with 173 additions and 215 deletions

View File

@@ -156,7 +156,11 @@ int main(int argc, char **argv)
i = getpid();
tty = ttyname(0);
if ((tty = ttyname(0)) == NULL) {
WriteError("Not at a tty");
Quick_Bye(0);
}
if (strncmp("/dev/", tty, 5) == 0)
sprintf(pTTY, "%s", tty+5);
else if (*tty == '/') {