summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/sh.c
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2007-10-15 15:23:07 +0000
committermp <mp@FreeBSD.org>2007-10-15 15:23:07 +0000
commit7932b1362619e94f8cf27c1c6f79ad49ecc39a3b (patch)
tree35061d37a02346eb49986c0acdfe36b69d17be1b /contrib/tcsh/sh.c
parent637c0444dc574ef343005895e3cfe1143c674c53 (diff)
downloadFreeBSD-src-7932b1362619e94f8cf27c1c6f79ad49ecc39a3b.zip
FreeBSD-src-7932b1362619e94f8cf27c1c6f79ad49ecc39a3b.tar.gz
Import two vendor fixes from tcsh-6.15.01 for MFC to 7.0. The fixes are:
- Fix pty detection for autologout setting - kill `foo` got stuck because sigchld was disabled too soon Requested by: re
Diffstat (limited to 'contrib/tcsh/sh.c')
-rw-r--r--contrib/tcsh/sh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tcsh/sh.c b/contrib/tcsh/sh.c
index 57b1bef..89056f5 100644
--- a/contrib/tcsh/sh.c
+++ b/contrib/tcsh/sh.c
@@ -457,12 +457,12 @@ main(int argc, char **argv)
if (*cp) {
/* only for login shells or root and we must have a tty */
if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) {
- cp = cp2 + 1;
+ cp2 = cp2 + 1;
}
else
cp2 = cp;
if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) ||
- ((Strncmp(cp, STRpts, 3) == 0) && cp[3] == '/'))) {
+ Strstr(cp, STRslptssl) != NULL)) {
if (getenv("DISPLAY") == NULL) {
/* NOT on X window shells */
setcopy(STRautologout, STRdefautologout, VAR_READWRITE);
OpenPOWER on IntegriCloud