diff options
Diffstat (limited to 'bin/sh/trap.c')
-rw-r--r-- | bin/sh/trap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/sh/trap.c b/bin/sh/trap.c index f562e27..8bfebc1 100644 --- a/bin/sh/trap.c +++ b/bin/sh/trap.c @@ -412,6 +412,7 @@ onsig(int signo) void dotrap(void) { + struct stackmark smark; int i; int savestatus, prev_evalskip, prev_skipcount; @@ -445,7 +446,9 @@ dotrap(void) last_trapsig = i; savestatus = exitstatus; - evalstring(trap[i], 0); + setstackmark(&smark); + evalstring(stsavestr(trap[i]), 0); + popstackmark(&smark); /* * If such a command was not |