Set control flags properly while in read mode.
Supply process ID when syslogging.
This commit is contained in:
parent
09301847a4
commit
437ee32a52
@ -39,7 +39,7 @@ static char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
|
||||
static char rcsid[] = "$Id: main.c,v 1.10 1994/08/24 16:42:23 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: main.c,v 1.11 1994/09/05 08:52:49 pk Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -170,7 +170,7 @@ main(argc, argv)
|
||||
/*
|
||||
signal(SIGQUIT, SIG_DFL);
|
||||
*/
|
||||
openlog("getty", LOG_ODELAY|LOG_CONS, LOG_AUTH);
|
||||
openlog("getty", LOG_ODELAY|LOG_CONS|LOG_PID, LOG_AUTH);
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
if (hostname[0] == '\0')
|
||||
strcpy(hostname, "Amnesiac");
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";*/
|
||||
static char rcsid[] = "$Id: subr.c,v 1.12 1994/08/24 16:39:24 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: subr.c,v 1.13 1994/09/05 08:52:52 pk Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -267,6 +267,11 @@ setflags(n)
|
||||
else
|
||||
cflag &= ~HUPCL;
|
||||
|
||||
if (MB)
|
||||
cflag |= MDMBUF;
|
||||
else
|
||||
cflag &= ~MDMBUF;
|
||||
|
||||
if (NL) {
|
||||
iflag |= ICRNL;
|
||||
oflag |= ONLCR;
|
||||
@ -280,7 +285,7 @@ setflags(n)
|
||||
if (RW) {
|
||||
iflag = 0;
|
||||
oflag = 0;
|
||||
cflag = CREAD|CS8;
|
||||
BICS(cflag, CSIZE|PARENB|PARODD, CS8);
|
||||
lflag = 0;
|
||||
} else {
|
||||
lflag &= ~ICANON;
|
||||
@ -319,11 +324,6 @@ setflags(n)
|
||||
if (DX)
|
||||
lflag |= IXANY;
|
||||
|
||||
if (MB)
|
||||
cflag |= MDMBUF;
|
||||
else
|
||||
cflag &= ~MDMBUF;
|
||||
|
||||
out:
|
||||
tmode.c_iflag = iflag;
|
||||
tmode.c_oflag = oflag;
|
||||
|
Loading…
Reference in New Issue
Block a user