Actually fix pty detection for autologout setting.

(The fix has been submitted upstream.)
This commit is contained in:
Ruslan Ermilov 2008-10-20 08:44:14 +00:00
parent 39f8ee3024
commit 3b8bd8e77a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184072
2 changed files with 2 additions and 2 deletions

View File

@ -462,7 +462,7 @@ main(int argc, char **argv)
else
cp2 = cp;
if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) ||
Strstr(cp, STRslptssl) != NULL)) {
Strstr(cp, STRptssl) != NULL)) {
if (getenv("DISPLAY") == NULL) {
/* NOT on X window shells */
setcopy(STRautologout, STRdefautologout, VAR_READWRITE);

View File

@ -46,7 +46,7 @@ Char STRautomatic[] = { 'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c',
Char STRhangup[] = { 'h', 'a', 'n', 'g', 'u', 'p', '\0' };
Char STRaout[] = { 'a', '.', 'o', 'u', 't', '\0' };
Char STRtty[] = { 't', 't', 'y', '\0' };
Char STRslptssl[] = { '/', 'p', 't', 's', '/', '\0' };
Char STRptssl[] = { 'p', 't', 's', '/', '\0' };
Char STRany[] = { 'a', 'n', 'y', '\0' };
Char STRstatus[] = { 's', 't', 'a', 't', 'u', 's', '\0' };
Char STR0[] = { '0', '\0' };