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

headless multiclient should exit when process dies #1617

Closed
briandealwis opened this issue Jul 15, 2019 · 0 comments · Fixed by #1621
Closed

headless multiclient should exit when process dies #1617

briandealwis opened this issue Jul 15, 2019 · 0 comments · Fixed by #1621

Comments

@briandealwis
Copy link
Contributor

1. What version of Delve are you using (dlv version)?

1.2.0 (from HEAD)

2. What version of Go are you using? (go version)?

go version go1.12 darwin/amd64

4. What did you do?

Terminal 1:

$ dlv debug --headless --accept-multiclient ./_fixtures/buildtest/
API server listening at: 127.0.0.1:57699
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1100.0.25..3
 for x86_64.
Got a connection, launched process /Users/bsd/go/src/github.com/go-delve/delve/debug (pid = 15033).

Now from Terminal 2, we connect and continue the process (dlv connect --init <(echo continue) :57699). We see a message saying that the process has existed with status 0.

In Terminal 1, we see additional output:

hello world!
Exiting.

But the headless dlv process now never exits. We can connect to it repeatedly (dlv connect :57699), but the dlv client never prompts to kill the target and the headless dlv process never exits. The dlv debug appears to be hung.

5. What did you expect to see?

Exiting the dlv connect instance should have prompted whether to kill the target.

If I instead debug a simple web app that just waits (http.ListenAndServe(":8080", nil)), a dlv connect followed by an exit prompts whether I'd like to kill the target instance.

6. What did you see instead?

The dlv debug process Is still alive. Which I guess makes sense so that a user can restart?

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

Successfully merging a pull request may close this issue.

2 participants