Op vrijdag 28 februari 2020 16:57:00 UTC+1 schreef Ian Lance Taylor: > > On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg <pkle...@xs4all.nl > <javascript:>> wrote: > > > > Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels: > >> > >> > >> Can you clarify that a bit? Did you change the code to look for EINTR > errors and then retry the system call? > > > > > > Yes, I did. But as an option that must be enabled by the user. > > I don't understand why you're making it an option. The README > suggests that you would not want to enable it if you want to handle > ^C, but in Go the ^C will be delivered on a channel, presumably to a > separate goroutine. At that point your program will either exit or do > some other operation. If the program doesn't exit, then it's not > going to want the interrupted system call to fail. It's going to want > it to be retried. >
I leave it to the end user to decide. I was inspired by this: http://250bpm.com/blog:12 > (As a minor side note, calls like getsockopt will never return EINTR, > it's not necessary to retry them. But it doesn't hurt.) > zmq_getsockopt can return EINTR says the man page. And some zmq functions can return EINTR even though their man page doesn't mention it. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/cbfe48d1-5af8-409a-8d73-87e99f04f1f1%40googlegroups.com.