pie icon indicating copy to clipboard operation
pie copied to clipboard

client.Close() blocks on Windows

Open timpaulshh opened this issue 8 years ago • 3 comments

Hey, using pie I've noticed that calling Close() on the client returned by pie.StartProviderCodec does not seem to work running on Windows. The call just blocks indefinitely. Your own sample code can be used to reproduce this issue. On Linux everything runs fine. I'm not sure if this is an issue with pie specifically or with Go's implementation of RPC. A quick Google search didn't bring up anything. Any ideas what could be the problem? I'm using Windows 10 and Go 1.7.

timpaulshh avatar Oct 03 '16 17:10 timpaulshh

I meet the same problem. I'm using Windows 7 and Go 1.8. Can you fix this please?

timidev avatar Aug 24 '17 08:08 timidev

I'll take a look, thanks for letting me know.

On Thu, Aug 24, 2017, 4:03 AM timidev [email protected] wrote:

I meet the same problem. I'm using Windows 7 and Go 1.8. Can you fix this please?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/natefinch/pie/issues/13#issuecomment-324563680, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCcyF8gtvFBbevakl1tyQ90dkIubu9Mks5sbS5ggaJpZM4KMz-y .

natefinch avatar Aug 24 '17 11:08 natefinch

I fixed this problem. iop.ReadCloser.Close() will block in windows 7 , I change the close squeue and fix it. Changing like bellow: // Close closes the pipe's WriteCloser, ReadClosers, and process. func (iop ioPipe) Close() error { var err error if writeErr := iop.WriteCloser.Close(); writeErr != nil { err = writeErr } err = iop.ReadCloser.Close() if procErr := iop.closeProc(); procErr != nil { err = procErr } return err }

fix.patch.txt

timidev avatar Aug 24 '17 15:08 timidev