Updates for terminal i/o

This commit is contained in:
Michiel Broek
2004-11-04 20:49:32 +00:00
parent aac11ee69e
commit 8a59793d06
5 changed files with 28 additions and 6 deletions

View File

@@ -66,7 +66,7 @@ void Good_Bye(int onsig)
* Don't display goodbye screen on SIGHUP and idle timeout.
* With idle timeout this will go into a loop.
*/
if ((onsig != SIGHUP) && (onsig != SIGALRM) && (onsig != MBERR_TIMEOUT) && (hanged_up == 0))
if ((onsig != SIGALRM) && (onsig != MBERR_TIMEOUT) && (hanged_up == 0))
DisplayFile((char *)"goodbye");
if (do_mailout)

View File

@@ -291,14 +291,14 @@ void ExtDoor(char *Program, int NoDoorsys, int Y2Kdoorsys, int Comport, int NoSu
}
clear();
PUTSTR((char *)"Loading ...");
PUTSTR((char *)"Loading, please wait ...");
Enter(2);
/*
* Put terminal back in cooked mode, prefered by some doors.
*/
cookedport();
if (NoSuid)
rc = exec_nosuid(Program);
else

View File

@@ -146,6 +146,25 @@ int main(int argc, char **argv)
sprintf(pTTY, "%s", tty);
}
/*
* Now that we have all terminal information, we close the tty and
* reopen the default tty so that doors will work.
*/
// cookedport();
// close(0);
// close(1);
// if ((i = open("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
// perror("open 0");
// exit(MBERR_TTYIO_ERROR);
// }
// Syslog('t', "new fd %d", i);
// if ((i = open("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
// perror("open 1");
// exit(MBERR_TTYIO_ERROR);
// }
// Syslog('t', "new fd %d", i);
// rawport();
umask(007);
/*

View File

@@ -80,10 +80,12 @@ void die(int onsig)
} else if (onsig == SIGALRM) {
Syslog('+', "User inactivity timeout");
} else {
if (onsig <= NSIG)
if (onsig <= NSIG) {
hanged_up = 1;
WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]);
else
} else {
WriteError("Terminated with error %d", onsig);
}
}
} else {
Syslog(' ', "Terminated by user");