Set erase character for login: prompt.
Submitted by: Peter Wemm & John Capo
This commit is contained in:
parent
e22b1cd1ca
commit
d0d1fb6198
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10562
@ -1076,6 +1076,7 @@ extern void utmp_sig_notify P((int));
|
||||
getptyslave()
|
||||
{
|
||||
register int t = -1;
|
||||
char erase;
|
||||
|
||||
#if !defined(CRAY) || !defined(NEWINIT)
|
||||
# ifdef LINEMODE
|
||||
@ -1092,12 +1093,13 @@ getptyslave()
|
||||
* if linemode was turned on
|
||||
* terminal window size
|
||||
* terminal speed
|
||||
* erase character
|
||||
* so that we can re-set them if we need to.
|
||||
*/
|
||||
# ifdef LINEMODE
|
||||
waslm = tty_linemode();
|
||||
# endif
|
||||
|
||||
erase = termbuf.c_cc[VERASE];
|
||||
|
||||
/*
|
||||
* Make sure that we don't have a controlling tty, and
|
||||
@ -1184,6 +1186,8 @@ getptyslave()
|
||||
tty_rspeed((def_rspeed > 0) ? def_rspeed : 9600);
|
||||
tty_tspeed((def_tspeed > 0) ? def_tspeed : 9600);
|
||||
# ifdef LINEMODE
|
||||
if (erase)
|
||||
termbuf.c_cc[VERASE] = erase;
|
||||
if (waslm)
|
||||
tty_setlinemode(1);
|
||||
# endif /* LINEMODE */
|
||||
|
@ -1076,6 +1076,7 @@ extern void utmp_sig_notify P((int));
|
||||
getptyslave()
|
||||
{
|
||||
register int t = -1;
|
||||
char erase;
|
||||
|
||||
#if !defined(CRAY) || !defined(NEWINIT)
|
||||
# ifdef LINEMODE
|
||||
@ -1092,12 +1093,13 @@ getptyslave()
|
||||
* if linemode was turned on
|
||||
* terminal window size
|
||||
* terminal speed
|
||||
* erase character
|
||||
* so that we can re-set them if we need to.
|
||||
*/
|
||||
# ifdef LINEMODE
|
||||
waslm = tty_linemode();
|
||||
# endif
|
||||
|
||||
erase = termbuf.c_cc[VERASE];
|
||||
|
||||
/*
|
||||
* Make sure that we don't have a controlling tty, and
|
||||
@ -1184,6 +1186,8 @@ getptyslave()
|
||||
tty_rspeed((def_rspeed > 0) ? def_rspeed : 9600);
|
||||
tty_tspeed((def_tspeed > 0) ? def_tspeed : 9600);
|
||||
# ifdef LINEMODE
|
||||
if (erase)
|
||||
termbuf.c_cc[VERASE] = erase;
|
||||
if (waslm)
|
||||
tty_setlinemode(1);
|
||||
# endif /* LINEMODE */
|
||||
|
Loading…
Reference in New Issue
Block a user