shared/eagain/file.go
func (ew Writer) Write(p []byte) (int, error) {
again:
	n, err := ew.Writer.Write(p)
	if err == nil {
		return n, nil
	}

	// keep retrying on EAGAIN
	errno, ok := shared.GetErrno(err)
	if ok && (errno == syscall.EAGAIN || errno == syscall.EINTR) {
		goto again
	}

	return n, err
}
func (ew Writer) Write(p []byte) (int, error) {
again:
	n, err := ew.Writer.Write(p)
	if err == nil {
		return n, nil
	}

	// keep retrying on EAGAIN
	errno, ok := shared.GetErrno(err)
	if ok && (errno == syscall.EAGAIN || errno == syscall.EINTR) {
		goto again
	}

	return n, err
}
func ( ew Writer ) Write ( p [ ] byte ) ( int , error ) { again : n , err := ew . Writer . Write ( p ) if err == nil { return n , nil } // keep retrying on EAGAIN errno , ok := shared . GetErrno ( err ) if ok && ( errno == syscall . EAGAIN || errno == syscall . EINTR ) { goto again } return n , err }
// Write behaves like io.Writer.Write but will retry on EAGAIN
Write behaves like io . Writer . Write but will retry on EAGAIN