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
This commit is contained in:
parent
4f796ffc7b
commit
5c3ede8519
@ -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);
|
||||
|
@ -1428,13 +1428,6 @@ pkill(Char **v, int signum)
|
||||
pid_t pid;
|
||||
Char *cp, **vp, **globbed;
|
||||
|
||||
pchild_disabled++;
|
||||
cleanup_push(&pchild_disabled, disabled_cleanup);
|
||||
if (setintr) {
|
||||
pintr_disabled++;
|
||||
cleanup_push(&pintr_disabled, disabled_cleanup);
|
||||
}
|
||||
|
||||
/* Avoid globbing %?x patterns */
|
||||
for (vp = v; vp && *vp; vp++)
|
||||
if (**vp == '%')
|
||||
@ -1444,6 +1437,12 @@ pkill(Char **v, int signum)
|
||||
globbed = v;
|
||||
cleanup_push(globbed, blk_cleanup);
|
||||
|
||||
pchild_disabled++;
|
||||
cleanup_push(&pchild_disabled, disabled_cleanup);
|
||||
if (setintr) {
|
||||
pintr_disabled++;
|
||||
cleanup_push(&pintr_disabled, disabled_cleanup);
|
||||
}
|
||||
|
||||
while (v && (cp = *v)) {
|
||||
if (*cp == '%') {
|
||||
|
@ -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 STRpts[] = { 'p', 't', 's', '\0' };
|
||||
Char STRslptssl[] = { '/', 'p', 't', 's', '/', '\0' };
|
||||
Char STRany[] = { 'a', 'n', 'y', '\0' };
|
||||
Char STRstatus[] = { 's', 't', 'a', 't', 'u', 's', '\0' };
|
||||
Char STR0[] = { '0', '\0' };
|
||||
|
Loading…
Reference in New Issue
Block a user