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

make sure the goroutine wont shut down in a docker #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

napoleon665
Copy link
Contributor

No description provided.

@robaho
Copy link
Owner

robaho commented Jul 18, 2024

It would be helpful if you are a bit more explicit in the problem statement.

I gather that what is happening is that the Docker container does not have standard input available, so the processing of standard input terminates leading to shutdown.

A few things:

The changes break the current interactive behavior, because if the user types quit, the process will still hang on the outer select and not terminate.

I believe the proper fix is to be more explicit. Move the input processing to its own function, and in the main() check if standard input is available and if so call the function, and if not perform the infinite select.

What do you think?

@robaho
Copy link
Owner

robaho commented Jul 22, 2024

@napoleon665 did you see my previous question?

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