It's perfectly okay to pass an invalid file descriptor into any at system call if an absolute path is used. In the following example I get "Warning: invalid file descriptor -1 in syscall openat()": #include <fcntl.h> #include <unistd.h> int main(void) { openat(-1, "/proc", O_RDONLY); }
This was fixed some time ago in r13159. See also bug #307103. I'm closing this as a duplicate. *** This bug has been marked as a duplicate of bug 307103 ***