Skip to content

Commit 17608ea

Browse files
a17tDTTLansiebert
andauthored
Using exec when starting a backend instead of spawning a new process (#2720)
Co-authored-by: Simon Siebert <[email protected]>
1 parent 9280060 commit 17608ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

backend/python/common/libbackend.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ function startBackend() {
148148
ensureVenv
149149

150150
if [ ! -z ${BACKEND_FILE} ]; then
151-
python ${BACKEND_FILE} $@
151+
exec python ${BACKEND_FILE} $@
152152
elif [ -e "${MY_DIR}/server.py" ]; then
153-
python ${MY_DIR}/server.py $@
153+
exec python ${MY_DIR}/server.py $@
154154
elif [ -e "${MY_DIR}/backend.py" ]; then
155-
python ${MY_DIR}/backend.py $@
155+
exec python ${MY_DIR}/backend.py $@
156156
elif [ -e "${MY_DIR}/${BACKEND_NAME}.py" ]; then
157-
python ${MY_DIR}/${BACKEND_NAME}.py $@
157+
exec python ${MY_DIR}/${BACKEND_NAME}.py $@
158158
fi
159159
}
160160

@@ -210,4 +210,4 @@ function checkTargets() {
210210
echo false
211211
}
212212

213-
init
213+
init

0 commit comments

Comments
 (0)