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>
This commit is contained in:
parent
9aa5c7bf16
commit
c915de82d8
2 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue