-
Notifications
You must be signed in to change notification settings - Fork 3k
ssh: use new supervisor:stop/1 function for stopping system #10253
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
ssh: use new supervisor:stop/1 function for stopping system #10253
Conversation
CT Test Results 2 files 29 suites 19m 19s ⏱️ For more details on these failures, see this check. Results for commit 53e1f07. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
|
Or maybe we think it is the supervisor that should catch the exception from gen_server:stop. We have time to fix that if we think so. Lets think about it. |
|
Although I dislike the behavior of exiting the calling process if the process was already terminated (and the user of the supervisor should not need to know how it is implemented), this behavior has existed a long time for gen_processes and someone made an argument that it is the only way for some one that may consider this an error to detect it. Also the supervisor PR actually both test and document this behavior, I did not really react to it as much as I was mainly concerned with other aspects of the PR and writing this off as gen_server behavior without fully understanding the consequences until ssh made a mistake in its test suite. I guess this would mostly happen by accident like a "double free in a c-program". Possibly also happen as a race if the process is terminated as due to a significant child terminating. Also the gen_call timoute will exit the calling process which is less of a problem now that you do not get late replies from the server to a client catching that. But there could still be reasons to rather implement a server side timeout. So maybe we should just live with it and you go ahead with this PR. @Maria-12648430 any thoughts? |
c71d4a9 to
4ed2e08
Compare
|
I think you mean this comment by @RaimoNiskanen, and following? I'm not sure if exiting is the most appropriate thing to do in such a case or whether If you really don't care, or want to accept double-stops, it is possible to do so by
I find it hard to imagine anything else than an accident, TBH.
Which is also something which might be worth investigating. If it gets to be noticed.
Hm, my tl;dr would be that, if you are willing to accept multiple stops in this specific case, just wrap the |
|
@Maria-12648430 yes I was already inclined to think it was best to leave it as is, your thoughts I think helps even more to |
|
thanks for comments. I wasn't really after hiding that behavior, but was misguided with with |
- improve ssh_connection_SUITE:stop_listener test
4ed2e08 to
53e1f07
Compare
Uh oh!
There was an error while loading. Please reload this page.