gerrit.sh: detach gerrit properly
If you don't close stdin, stderr and stdout then gerrit will keep f.ex. ssh sessions open. Not good if you want to do: ssh <host> "./review_site/bin/gerri.sh start" Change-Id: If2b169239fe9966b23cd847543a4f7652dd91ba6
This commit is contained in:

committed by
Shawn O. Pearce

parent
967eae196f
commit
d66ef2d958
@@ -380,12 +380,12 @@ case "$ACTION" in
|
||||
chown $GERRIT_USER "$GERRIT_PID"
|
||||
su - $GERRIT_USER -c "
|
||||
JAVA='$JAVA' ; export JAVA ;
|
||||
$RUN_EXEC $RUN_Arg1 '$RUN_Arg2' $RUN_Arg3 $RUN_ARGS &
|
||||
$RUN_EXEC $RUN_Arg1 '$RUN_Arg2' $RUN_Arg3 $RUN_ARGS </dev/null >/dev/null 2>&1 &
|
||||
PID=\$! ;
|
||||
disown ;
|
||||
echo \$PID >\"$GERRIT_PID\""
|
||||
else
|
||||
$RUN_EXEC $RUN_Arg1 "$RUN_Arg2" $RUN_Arg3 $RUN_ARGS &
|
||||
$RUN_EXEC $RUN_Arg1 "$RUN_Arg2" $RUN_Arg3 $RUN_ARGS </dev/null >/dev/null 2>&1 &
|
||||
PID=$!
|
||||
type disown >/dev/null 2>&1 && disown
|
||||
echo $PID >"$GERRIT_PID"
|
||||
|
Reference in New Issue
Block a user