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

cli_common: Fix wait_return availability on Windows #811

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

mic12130
Copy link
Contributor

As sigwait is only available on Unix, running some services on Windows can result in errors like this comment

It's more common to use Enter to exit processes instead of Ctrl+C on Windows, so I reverted the behavior on Windows to what it was before #680

This PR needs to be tested along with #797 for now since Windows support is not yet on master.

@mic12130
Copy link
Contributor Author

Just wondering why not just end the process without waiting for a signal or input - this seems to be more efficient and elegant

@doronz88
Copy link
Owner

doronz88 commented Jan 27, 2024

The main reason someone else created this PR to change it from input to signal, was so he could end this process more easily when starting it programatically. See #680

@mic12130
Copy link
Contributor Author

mic12130 commented Jan 27, 2024

Understood. Since we don't have an alternative to sigwait on Windows, do you have any idea of the workaround?

Some of my ideas:

  • Wait for an Enter (current changes)
  • Run an infinite loop to wait for a Ctrl+C/SIGINT
  • No wait, simply quit

@doronz88
Copy link
Owner

@mic12130 i'm okay with your suggested PR, just fix the linting issues

@doronz88 doronz88 force-pushed the fix/wait-return-on-win branch from 9d09c00 to 0d262a2 Compare January 28, 2024 10:55
@doronz88 doronz88 changed the title Fix wait_return availability on Windows cli_common: Fix wait_return availability on Windows Jan 28, 2024
@doronz88 doronz88 merged commit 88ff187 into doronz88:master Jan 28, 2024
17 checks passed
@mic12130 mic12130 deleted the fix/wait-return-on-win branch January 28, 2024 14:43
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