go-cmd / cmd

Non-blocking external commands in Go with streaming output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Process not terminating

opened this issue · comments

I am on Mac.

When I run the streaking example but calling my long running server ( a golang server ), and I use control c key my golang server is still hanging around..

??

Something in the example is missing for the streaking example ?

Or my golang server is not sending out the correct termination signals ?

Difficult to say without seeing the code. Also not clear on what you're doing: are you CTRL-C'ing the server or the streaming client?

If you're CTRL-C'ing the server and it's not stopping, then it's most likely a bug in the server code. Without doing a full debug of that code, it looks like the issue would be in https://github.com/jirenius/resgate/blob/master/service/service.go#L110 or one of the functions it calls. I would debug and make sure https://github.com/jirenius/resgate/blob/master/main.go#L197 does, in fact, return and everything that should be stopped is stopped.

It's been awhile, so I'll close this issue for now. If you find a reproducible bug, please re-open. Thanks!