File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,17 @@ handle_int() {
17
17
trap handle_term SIGTERM
18
18
trap handle_int SIGINT
19
19
20
- while [ " $killed " -eq 0 ]; # stop looping if we were interrupted
21
- do
22
- # start change script and our server
23
- echo ' starting process...'
24
- " $@ " &
25
- child=$!
26
- sleep 10 && echo " killing pid $child ..." && kill -9 " $child "
27
- while kill -0 " $child " 2> /dev/null; do # wait for child to exit (kill -0 is falsy if pid is gone)
28
- sleep 1
29
- done
30
- echo ' killed process...' && sleep 5
20
+ # start change script and our server
21
+ echo ' starting process...'
22
+ " $@ " &
23
+ child=$!
24
+ sleep 10
25
+ echo " killing pid $child ..."
26
+ kill -9 " $child "
27
+ while kill -0 " $child " 2> /dev/null; do # wait for child to exit (kill -0 is falsy if pid is gone)
28
+ sleep 1
31
29
done
30
+ echo ' killed...'
31
+ sleep 5
32
+ echo ' restarting process...'
33
+ " $@ "
You can’t perform that action at this time.
0 commit comments