Skip to content

Commit

Permalink
Supress ugly kill message with disown - bash magick
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jun 19, 2017
1 parent 06c854f commit 1e76d92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/cli/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ initServer() {
${SERVER_EXE} start --home=$SERVE_DIR >>$SERVER_LOG 2>&1 &
sleep 5
PID_SERVER=$!
disown
if ! ps $PID_SERVER >/dev/null; then
echo "**FAILED**"
# cat $SERVER_LOG
Expand Down
5 changes: 3 additions & 2 deletions tests/cli/ibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ startRelay() {
# send some cash to the default key, so it can send messages
RELAY_KEY=${BASE_DIR_1}/server/key.json
RELAY_ADDR=$(cat $RELAY_KEY | jq .address | tr -d \")
echo starting relay $PID_RELAY ...

# get paid on chain1
export BC_HOME=${CLIENT_1}
Expand All @@ -163,11 +164,11 @@ startRelay() {
${SERVER_EXE} relay start --chain1-id=$CHAIN_ID_1 --chain2-id=$CHAIN_ID_2 \
--chain1-addr=tcp://localhost:${PORT_1} --chain2-addr=tcp://localhost:${PORT_2} \
--from=$RELAY_KEY > ${BASE_DIR_1}/../relay.log &
sleep 2
PID_RELAY=$!
echo starting relay $PID_RELAY ...
disown

# return an error if it dies in the first two seconds to make sure it is running
sleep 2
ps $PID_RELAY >/dev/null
return $?
}
Expand Down

0 comments on commit 1e76d92

Please sign in to comment.