Special file descriptors in BPF
Developers learning the Unix (or POSIX in general) system-call set will
quickly encounter file descriptors, which are used to represent open files
and more. Developers also tend to learn early on that the first three file
descriptors are special, with file descriptor zero being the standard input
stream, one being standard output, and two being standard error. The
kernel, though, does not normally attach any specific meaning to a given
descriptor number, so it was somewhat surprising when a recent BPF patch
series attempted to attach a special meaning to zero when used as a file
descriptor.