--- sh.proc.c.orig 2007-07-11 14:42:06.000000000 -0700 +++ sh.proc.c 2007-07-06 07:34:01.000000000 -0700 @@ -1428,13 +1428,6 @@ 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 @@ 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 == '%') { @@ -1516,7 +1515,7 @@ cont: v++; } - cleanup_until(&pchild_disabled); + cleanup_until(globbed); if (err1) stderror(ERR_SILENT); }