1
0
Fork 1
mirror of https://github.com/Zerodya/hyprfreeze.git synced 2024-09-19 15:33:20 +02:00

fix: PIDS not correctly stopped after sanitization

This commit is contained in:
Nicola 2024-02-13 11:46:40 +01:00 committed by GitHub
parent 7bca1bb979
commit f3689a5806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,10 +47,10 @@ function toggleFreeze() {
# Suspend or resume processes
if [[ "$(ps -o state= "$PID")" == T ]]; then
debugPrint "Resuming processes..."
kill -CONT "$PIDS" 2>/dev/null && echo "Resumed $(ps -p "$PID" -o comm= 2>/dev/null) (PID $PID)" || exit 1
kill -CONT $PIDS 2>/dev/null && echo "Resumed $(ps -p "$PID" -o comm= 2>/dev/null) (PID $PID)" || exit 1
else
debugPrint "Suspending processes..."
kill -STOP "$PIDS" 2>/dev/null && echo "Suspended $(ps -p "$PID" -o comm= 2>/dev/null) (PID $PID)" || exit 1
kill -STOP $PIDS 2>/dev/null && echo "Suspended $(ps -p "$PID" -o comm= 2>/dev/null) (PID $PID)" || exit 1
fi
}