V
V
Vitaly Stolyarov2016-05-19 13:15:39
ubuntu
Vitaly Stolyarov, 2016-05-19 13:15:39

How to kill a process that is blocking input devices?

In a C ++ project I use OIS to work with input devices, but for some reason, when the listener on the keyboard is enabled and the current application is active, the system key combinations do not work, for example, when OIS is not enabled, Alt + F4 works, but similar commands do not work with it respond.
Everything would be fine if in debug mode, when the application catches an error, the keyboard and mice were not blocked, because of which I cannot kill the process by any means: neither through the graphical environment, nor through hotkey
UPDATE: I will add that the input is blocked - output when the application is running, but Alt-Tab allows you to refocus on another window, but when debugging through GDB, even this cannot be done

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ivan Bogachev, 2016-05-19
@Ni55aN

Ctrl+Alt+f1 also blocked?

A
Azazel PW, 2016-05-19
@azazelpw

The dumbest way is
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 put
crontab -e
*/1 * * * * /path/killthemall.sh into the cron,
the script will run every minute to check.
You can sit and finish adding rc.d to autoload, make a while sleep 1 loop and then it will monitor and kill this process when loading.
But this is fire fighting. Understand where the legs grow from.

A
Andrey, 2016-05-19
@VladimirAndreev

Removing / inserting the keyboard does not help?

V
VitGun, 2016-05-19
@VitGun

ps -ax | grep "process name"
kill "processID"
?

D
Dima Kim, 2016-05-19
@jalpy

can be through a script to kill?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question