Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respond to CTRL+C SIGINT #43

Open
lhstrh opened this issue Mar 17, 2023 · 2 comments
Open

Respond to CTRL+C SIGINT #43

lhstrh opened this issue Mar 17, 2023 · 2 comments

Comments

@lhstrh
Copy link
Member

lhstrh commented Mar 17, 2023

@zekailin00 found that when he attempts to interrupt the execution of his DeepRacer controller that uses the Cpp target, the program just keeps on running. Both Ctrl + C and Ctrl + D are ignored, and Ctrl + Z lets the program end abruptly (sometimes triggering a segfault). It is important to free up resources at the end of execution, or else things like GPIO pins become inaccessible during subsequent runs of the program, making debugging very onerous. Can we respond to Ctrl + C by initiating the shutdown sequence, like we're doing in reactor-c?

@tanneberger
Copy link
Member

Yes there are currently no OS signal handling. We were hesitant to implement this because this means a lot of macro magic to handle different operating systems. But can do

@lhstrh
Copy link
Member Author

lhstrh commented Apr 6, 2023

I think it would be very useful to have it. I think the use case above alone is compelling...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants