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

Add cleanup() to headless mode docs #673

Open
Tracked by #693
henrypinkard opened this issue Aug 24, 2023 · 2 comments
Open
Tracked by #693

Add cleanup() to headless mode docs #673

henrypinkard opened this issue Aug 24, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@henrypinkard
Copy link
Member

No description provided.

@henrypinkard henrypinkard added the documentation Improvements or additions to documentation label Aug 24, 2023
@ieivanov
Copy link
Collaborator

I've haven't had good experience trying to call cleanup() independently. I most often run into problems when trying to quit an acquisition with Ctr+C.

The trick is that cleanup() needs to be called exactly once. It is always called when python exists normally, so the script will hang if you also try to call it once before. But apparently atexit registered functions are not called if the program does not exit normally, like with Ctr+C. I found this topic but I haven't been able to get it to work yet - I need to close my terminal if I want to quit mid acquisition.

@henrypinkard
Copy link
Member Author

Does this fix solve the problem for you? #674

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

No branches or pull requests

2 participants