Force new process group using setgid -f when starting anything that may possibly kill an entire progress group (kill -9 0) #117

This fixes https://todo.sr.ht/~mil/sxmo-tickets/117 and the crashes when
toggling the modem monitor.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
master
Maarten van Gompel 4 years ago committed by Anjandev Momi
parent 9aa5c7bf16
commit c915de82d8
  1. 4
      scripts/core/sxmo_gesturehandler.sh
  2. 2
      scripts/modem/sxmo_modemmonitortoggle.sh

@ -76,10 +76,10 @@ if [ "$HANDLE" -ne 0 ]; then
pkill -9 "$KEYBOARD" pkill -9 "$KEYBOARD"
;; ;;
"showmenu") "showmenu")
pidof dmenu || sxmo_appmenu.sh & pidof dmenu || setsid -f sxmo_appmenu.sh &
;; ;;
"showsysmenu") "showsysmenu")
pidof dmenu || sxmo_appmenu.sh sys & pidof dmenu || setsid -f sxmo_appmenu.sh sys &
;; ;;
"hidemenu") "hidemenu")
pkill -9 dmenu pkill -9 dmenu

@ -2,7 +2,7 @@
if pgrep -f sxmo_modemmonitor.sh; then if pgrep -f sxmo_modemmonitor.sh; then
pgrep -f sxmo_modemmonitor.sh | grep -Ev "^${$}$" | xargs -IP kill -TERM P pgrep -f sxmo_modemmonitor.sh | grep -Ev "^${$}$" | xargs -IP kill -TERM P
else else
sxmo_modemmonitor.sh & setsid -f sxmo_modemmonitor.sh &
fi fi
NOTIFDIR="$XDG_CONFIG_HOME"/sxmo/notifications NOTIFDIR="$XDG_CONFIG_HOME"/sxmo/notifications

Loading…
Cancel
Save