Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PROCES_ID=$(xprop | awk '/PID/ {print $3}' | xargs ps h -o pid)
- PROCES_STAV=$(ps aux | grep $PROCES_ID | awk '{print $8}')
- if [[ "$PROCES_STAV" == *Sl* ]]
- then
- # SIGSTOP 19
- kill -s 19 $PROCES_ID
- echo "Zastavuji proces $PROCES_ID";
- fi
- if [[ "$PROCES_STAV" == *Tl* ]]
- then
- # SIGCONT 18
- kill -s 18 $PROCES_ID
- echo "Pokracuji proces $PROCES_ID";
- fi
- # POPIS SIGNALU:
- # http://www.comptechdoc.org/os/linux/programming/linux_pgsignals.html
Add Comment
Please, Sign In to add comment