diff options
author | tv <tv@iiso> | 2011-09-20 03:05:14 +0200 |
---|---|---|
committer | tv <tv@iiso> | 2011-09-20 03:05:14 +0200 |
commit | 08a6dc70d957912c864516ad705c7c724f363b73 (patch) | |
tree | 8d36a79441e050735ff6376cfc4aaece809f659f | |
parent | e1089de23a7e3b316e0c06b4e60c7f6e05d8d5dd (diff) |
//hyper/process/spawn: defer w/ dash-compat trap
-rwxr-xr-x | hyper/process/spawn | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hyper/process/spawn b/hyper/process/spawn index a0043ec7..c2b829ca 100755 --- a/hyper/process/spawn +++ b/hyper/process/spawn @@ -53,7 +53,6 @@ spawn() { defer() { defer="$*${defer+ $defer}" - trap "$defer" EXIT } # @@ -64,7 +63,8 @@ $defer}" # cancel() { defer="`echo "$defer" | grep -Fxv "$*"`" - trap "$defer" EXIT } +# setup deferred execution and spawn command +trap 'eval "${defer-}"; defer=' EXIT INT spawn "$@" |