Skip to content

new InputEvent() hangs the terminal after closing node, needs kill -9 #21

@v934

Description

@v934

Hi,
I'm trying to use this package for my nodejs project running on an armv7 device with node v8.9.4.
I was amazed that it worked right away, without any problems. I can easily read events from /dev/input following the examples.

However I have one problem, when I close the node script (ctrl+c), my script itself stops working and I can even catch the SIGINT even telling it to stop, however after pressing ctrl+c, I cannot type anything into the terminal (nor press CTRL+C) anymore, it's stuck. The only way to stop is to execute killall -9 node and it frees the terminal.

It's caused solely by using new InputEvent('/dev/input/event0');, if I comment this line, it's not freezing anymore.

What can be the cause of this? Is there any way to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions