title: Go: Why does os.Getwd() sometimes fail with EOF
body: <pre><code>package main
  import "os"
  import "fmt"
  
  func main() {
      _, err := os.Getwd()
      if err != nil {
          fmt.Println(err)
      }
  }
  </code></pre>
  
  <p>This sometimes prints an error of EOF. Does anyone know why? There's usually some os.Chdir happening before, but that doesn't error out.</p>
  
  <pre><code>GOARCH="amd64"
  GOBIN=""
  GOCHAR="6"
  GOEXE=""
  GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common"
  GOHOSTARCH="amd64"
  GOHOSTOS="darwin"
  GOOS="darwin"
  
  go version go1.0.3
  </code></pre>