You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+1 that. I had trouble daemonizing my gopherbot program, and with some help tracked it down to CaptureOutput. The symptom was an http POST hanging until it finally got killed by a SIGPIPE. I think it ended up having multiple threads reading from the same fd.
I was using CaptureOutput to feed stdout/sderr into the log file, but when I disabled that things started working again. If I get more time & motivation, I'll look more, but for now I'm just going to fix the library that's logging to stderr so I don't have to worry about capturing it. Otherwise godaemon is great - I was very happy with the ease of opening the log file in StageParent for later use in the daemon.
@parsley42 - Interesting I find the opposite true... When CaptureOutput is false, calls to net/http Client.Do() hang. With CaptureOutput (true) but nothing reading from the captured output, the app just silently dies. With CaptureOutput(true) and a io.Copy sending it to a file, then it all works fine.
It would be great to have automated tests that verify that our piped STDERR and STDOUT are working correctly.
The text was updated successfully, but these errors were encountered: