From 17608ea6aa1999b3d5b21942c85196d95ad7c518 Mon Sep 17 00:00:00 2001 From: Simon Siebert Date: Fri, 5 Jul 2024 18:59:18 +0200 Subject: [PATCH] Using exec when starting a backend instead of spawning a new process (#2720) Co-authored-by: Simon Siebert --- backend/python/common/libbackend.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/python/common/libbackend.sh b/backend/python/common/libbackend.sh index 5c5805b99179..e8dfea03d56d 100644 --- a/backend/python/common/libbackend.sh +++ b/backend/python/common/libbackend.sh @@ -148,13 +148,13 @@ function startBackend() { ensureVenv if [ ! -z ${BACKEND_FILE} ]; then - python ${BACKEND_FILE} $@ + exec python ${BACKEND_FILE} $@ elif [ -e "${MY_DIR}/server.py" ]; then - python ${MY_DIR}/server.py $@ + exec python ${MY_DIR}/server.py $@ elif [ -e "${MY_DIR}/backend.py" ]; then - python ${MY_DIR}/backend.py $@ + exec python ${MY_DIR}/backend.py $@ elif [ -e "${MY_DIR}/${BACKEND_NAME}.py" ]; then - python ${MY_DIR}/${BACKEND_NAME}.py $@ + exec python ${MY_DIR}/${BACKEND_NAME}.py $@ fi } @@ -210,4 +210,4 @@ function checkTargets() { echo false } -init \ No newline at end of file +init