On Monday, October 27, 2014 12:42:17 PM UTC-4, Nick Patavalis wrote:

On Monday, October 27, 2014 6:39:50 PM UTC+2, Gustavo Niemeyer wrote:

I don't understand what you're alluding to. If you call read on a closed
fd, you get an appropriate error saying you're attempting to do so.

Not if between your close() and the goroutine's read() another (unrelated)
goroutine has called open() and the fd-number gets reused.
Have you confirmed that the runtime doesn't handle this correctly already?
You shouldn't be calling syscall.Close(fd) to close the fd directly, you
should be using the file's Close() method.

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 13 of 28 | next ›
Discussion Overview
groupgolang-nuts @
postedOct 26, '14 at 9:10a
activeOct 27, '14 at 7:01p



site design / logo © 2022 Grokbase