File Descriptor Tableとは?
file descriptor tableは、各プロセスが保持するkernel構造で、プロセスが使う小さな整数であるfile descriptorを、その基盤にある開いたファイル、pipe、socketに結びつけます。open呼び出しごとにエントリが追加され、close呼び出しごとに削除され、tableにはサイズの上限があります。standard input、output、errorは慣習によりdescriptorのゼロ、1、2を占めます。
なぜ重要か
長時間動作するCIプロセスがdescriptorを閉じずにリークすると、やがて上限に達しtoo-many-open-filesエラーで失敗します。tableがプロセスごとで上限があると知っていれば、こうした失敗やリダイレクトの仕組みを説明できます。
関連ガイド
What Is an Anonymous Pipe?An anonymous pipe is an unnamed in-memory channel that connects the output of one process to the input of ano…
What Is a Ulimit Soft Limit?A ulimit soft limit is the currently enforced ceiling on a process resource, such as open files, that a proce…
What Is an Inotify Watch?An inotify watch is a Linux registration that notifies a program when a specific file or directory changes, p…