On Monday, October 27, 2014 12:42:17 PM UTC-4, Nick Patavalis wrote:
Not if between your close() and the goroutine's read() another (unrelated)
goroutine has called open() and the fd-number gets reused.
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.
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.
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.