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

Improve the way we wait for commands in driver #3398

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

vlstill
Copy link
Contributor

@vlstill vlstill commented Jun 20, 2022

  • avoid leaving orphaned command subprocesses
  • don't let CTRL+C kill the driver, forward it instead

- avoid leaving orphaned command subprocesses
- don't let CTRL+C kill the driver, forward it instead
import signal
p.send_signal(signal.SIGINT)
except:
import traceback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are local imports considered good style?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, do you consider them OK in your python code? I personaly would not use them, but there are local imports around this code so I assumed that is deliberate. I could hoist them both to the preamble.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand, I don't think there are downsides to moving them to the top (maybe the start could be a tiny bit slower, but likely these modules are loaded somewhere in background anyway). So I moved them to the top.

@vlstill vlstill merged commit b816424 into main Jun 22, 2022
@fruffy fruffy deleted the vstill/driver-subprocess-wait branch August 13, 2022 16:04
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

Successfully merging this pull request may close these issues.

2 participants