by prodding of wbx@ let functions inherit a global xtrace

(also since all other shells seem to do it, save posh which doesn’t trace‽)
This commit is contained in:
tg 2011-04-17 15:40:35 +00:00
parent 61a8888213
commit fb93c5e225

4
exec.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.89 2011/04/02 10:30:10 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.90 2011/04/17 15:40:35 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@ -717,7 +717,7 @@ comexec(struct op *t, struct tbl * volatile tp, const char **ap,
}
old_xflag = Flag(FXTRACE);
Flag(FXTRACE) = tp->flag & TRACE ? 1 : 0;
Flag(FXTRACE) |= tp->flag & TRACE ? 1 : 0;
old_inuse = tp->flag & FINUSE;
tp->flag |= FINUSE;