EBADF
Bad file descriptor
- Linux value
- 9
- strerror(3)
- Bad file descriptor
- On this site
- 17 syscalls
Where you will see EBADF
- cachestat(2)Linux · Filesystem
fd is not a valid open file descriptor.
- copy_file_range(2)Linux · I/O
A file descriptor is invalid or opened with the wrong mode.
- fallocate(2)Linux · Filesystem
fd is not open for writing.
- flock(2)Linux · File descriptors
fd is not an open file descriptor.
- kcmp(2)Linux · Processes
idx1 or idx2 is not an open fd in the respective process (KCMP_FILE / KCMP_EPOLL_TFD).
- pidfd_getfd(2)Linux · File descriptors
pidfd is not a PID fd, or targetfd is not open in the target process.
- pidfd_send_signal(2)Linux · Processes
pidfd is not a valid PID file descriptor.
- posix_fadvise(2)Linux · I/O
fd is not a valid open file descriptor.
- process_madvise(2)Linux · Memory
pidfd is not a valid PID file descriptor.
- SCM_RIGHTSLinux · IPC
sendmsg(2): a descriptor being sent is not an open file descriptor.
- setns(2)Linux · Processes
fd is not a valid file descriptor.
- signalfd(2)Linux · Events
fd is not a valid file descriptor.
- SO_REUSEPORTLinux · I/O
setsockopt(2): sockfd is not a valid file descriptor.
- splice(2)Linux · I/O
A file descriptor is invalid or lacks the needed read/write mode.
- statx(2)Linux · Filesystem
path is relative but dirfd is neither AT_FDCWD nor a valid fd.
- sync_file_range(2)Linux · I/O
fd is not a valid file descriptor.
- vmsplice(2)Linux · IPC
fd is not a valid write end of a pipe.
Sources
- errno(3), Linux man-pages
- The meaning for each syscall is taken from that syscall's own card and the man page it cites.
Values are the Linux numbers on x86 and arm64; other architectures and the BSDs number some errors differently. BSD cards list the names the BSD man page uses. Spot one that's wrong? Tell Rod.