run-*d.sh: fix --shell support when interrupted
commit201a5d4aeae3bc43927aeb2b4fed6043d51cdf93
authorKyle J. McKay <mackyle@gmail.com>
Mon, 27 Jan 2014 18:05:24 +0000 (27 10:05 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 27 Jan 2014 18:05:24 +0000 (27 10:05 -0800)
treec19a4c74f1761d06b2917c355ade6bfab000e6c5
parenta4b6378eb2511a53aa87290afe096f22d1f55480
run-*d.sh: fix --shell support when interrupted

The --shell option is supposed to enter an interactive shell after
the jobd or taskd executable exits.  But if jobd or taskd was
interrupted with a signal (e.g. SIGINT via ^C) then the script
itself would also be interrupted and the --shell option would not
take effect.

Switch to /bin/bash instead of /bin/sh and set a trap to make
sure the --shell option remains effective when the jobd or taskd
executable is interrupted via a signal.
toolbox/run-jobd.sh
toolbox/run-taskd.sh