Jump to content

Jakokdybyholub

Member
  • Content Count

    1
  • Joined

  • Last visited

  1. Jakokdybyholub

    Linux gaming technical discussion

    That kill script can kill processes that are not wine related. #!/bin/bash sleep 30 for KILLPID in `ps ax | grep -i '.exe' | awk ' { print $1;}'`; do kill -9 $KILLPID; done killall -I -s KILL -v wineserver  Problem is with the regular expression in grep command. The '.exe' will match exe with any prefix (the dot is special symbol for any character) For example, on my system it could kill also these processes: 2000 ? Sl 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.6 /org/gtk/gvfs/exec_spaw/0 7739 ? Sl 0:00 /usr/lib/gvfs/gvfsd-http --spawner :1.6 /org/gtk/gvfs/exec_spaw/1 For start, I would suggest to edit the script in this manner (adding backslash "\" to grep -i '\.exe') #!/bin/bash sleep 30 for KILLPID in `ps ax | grep -i '\.exe' | awk ' { print $1;}'`; do kill -9 $KILLPID; done killall -I -s KILL -v wineserver  In this case, it will only match lines that contains '.exe' But it would be much better to test if a process is wine releated. Maybe changing the script to something like this would be enough: #!/bin/bash sleep 30 # kills currently running wineserver wineserver -k
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.