How to kill the process that locks the input devices?
In the project C++ use OIS to work with input devices, but for some reason when involved listener on the keyboard and the current application is active, not working keyboard shortcuts of the system, for example, when idle OIS Alt+F4 works, but the same commands do not respond.
All anything, if in debug mode when the application catch the error does not lock the keyboard and mouse, which I can't by any means kill the process, either through a graphical environment or using hotkey
UPDATE: will Supplement that blocks I / o while the application is running, but Alt-Tab allows you refocus to another window, but when debugging using GDB, even this cannot be done
5 answers
Ctrl+Alt+f1 is also blocked?
The most stupid method
touch killthemall.sh
chmod +x killthemall.sh
echo "
#!/bin/bash
a = `ps -ax |grep listener`
for b in $a
do
kill -9 $b
done
"> killthemall.sh
and then push in crowns
crontab-e
*/1 * * * * /path/killthemall.sh
the script will runs every minute to check.
You can sit and finished to add to the startup rc.d to do a while loop with a sleep 1 and then he will be at boot monitor runs and to kill the process.
But this fire-fighting. Understand where the Shoe pinches.
remove/insert the keyboard does not work?
ps-ax | grep "process name"
kill "processID"
?
Find more questions by tags Ubuntu