diff options
author | btpka3 | 2015-01-30 04:15:27 +0000 |
---|---|---|
committer | Greg Wilkins | 2015-10-12 21:41:09 +0000 |
commit | e5711080306dfa4dfc44ff5e8d65dcdbe75cb4d7 (patch) | |
tree | 6d38823eca939ee33db19f324b4628b58a6376a2 /jetty-distribution | |
parent | 6492ef7c78382208ab032a58605236598b4cc65e (diff) | |
download | org.eclipse.jetty.project-e5711080306dfa4dfc44ff5e8d65dcdbe75cb4d7.tar.gz org.eclipse.jetty.project-e5711080306dfa4dfc44ff5e8d65dcdbe75cb4d7.tar.xz org.eclipse.jetty.project-e5711080306dfa4dfc44ff5e8d65dcdbe75cb4d7.zip |
execute throuth ssh without hanging
`ssh root@192.168.1.100 "service jetty restart"` will not exit after start.
https://github.com/eclipse/jetty.project/pull/36
Signed-off-by: btpka3 <btpka3@163.com>
Diffstat (limited to 'jetty-distribution')
-rwxr-xr-x | jetty-distribution/src/main/resources/bin/jetty.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh index 043d205177..f00d8031ce 100755 --- a/jetty-distribution/src/main/resources/bin/jetty.sh +++ b/jetty-distribution/src/main/resources/bin/jetty.sh @@ -457,11 +457,11 @@ case "$ACTION" in chown "$JETTY_USER" "$JETTY_PID" # FIXME: Broken solution: wordsplitting, pathname expansion, arbitrary command execution, etc. su - "$JETTY_USER" $SU_SHELL -c " - exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" & + exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" > /dev/null & disown \$! echo \$! > '$JETTY_PID'" else - "${RUN_CMD[@]}" & + "${RUN_CMD[@]}" > /dev/null & disown $! echo $! > "$JETTY_PID" fi |