restore property that fstat(AT_FDCWD) fails with EBADF
authorRich Felker <dalias@aerifal.cx>
Thu, 18 Jul 2019 23:41:52 +0000 (19:41 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 18 Jul 2019 23:47:46 +0000 (19:47 -0400)
commiteeff60608c7aa65806c7c9f0ebddcf2520684ffa
treef8632785fb8ebefa892f15fe1e05b02091de6b07
parentfa7d4218c7038cb4bd29cbdf693306118b324030
restore property that fstat(AT_FDCWD) fails with EBADF

AT_FDCWD is not a valid file descriptor, so POSIX requires fstat to
fail with EBADF. if passed to fstatat, the call would spuriously
succeed and return results for the working directory.
src/stat/fstat.c