diff options
author | Bryan Drewery <bryan@shatow.net> | 2018-02-04 04:36:47 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2018-02-08 05:53:07 +0300 |
commit | 17a5084cbf5c43b6271f602fcebf1c15b5000696 (patch) | |
tree | 639fe3bcb73dd24ac5dd312cf2bcb7df7f17e170 /external | |
parent | 700ad285a3abb2b06906bfaeabf32a9720a7df65 (diff) |
Add trap_push/pop builtins
Diffstat (limited to 'external')
-rw-r--r-- | external/sh/trap.c | 4 | ||||
-rw-r--r-- | external/update_sh.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/external/sh/trap.c b/external/sh/trap.c index 8a230241..58cb0177 100644 --- a/external/sh/trap.c +++ b/external/sh/trap.c @@ -74,11 +74,11 @@ __FBSDID("$FreeBSD: head/bin/sh/trap.c 326025 2017-11-20 19:49:47Z pfg $"); #define S_RESET 5 /* temporary - to reset a hard ignored sig */ -static char sigmode[NSIG]; /* current value of signal */ +char sigmode[NSIG]; /* current value of signal */ volatile sig_atomic_t pendingsig; /* indicates some signal received */ volatile sig_atomic_t pendingsig_waitcmd; /* indicates wait builtin should be interrupted */ static int in_dotrap; /* do we execute in a trap handler? */ -static char *volatile trap[NSIG]; /* trap handler commands */ +char *volatile trap[NSIG]; /* trap handler commands */ volatile sig_atomic_t gotsig[NSIG]; /* indicates specified signal received */ static int ignore_sigchld; /* Used while handling SIGCHLD traps. */ diff --git a/external/update_sh.sh b/external/update_sh.sh index cceb6f46..ab164790 100644 --- a/external/update_sh.sh +++ b/external/update_sh.sh @@ -44,7 +44,7 @@ cd "${ORIG_PWD}" # Fix backwards compat for st_mtim sed -i '' -e 's,[[:<:]]st_mtim[[:>:]],st_mtimespec,g' "${DESTDIR}/test.c" # Allow interaction with traps -sed -i '' -Ee 's,^static (volatile sig_atomic_t gotsig),\1,' \ +sed -i '' -Ee 's,^static (char sigmode|char \*volatile trap|volatile sig_atomic_t gotsig),\1,' \ "${DESTDIR}external/sh/trap.c" git add -A "${DESTDIR}" |