터미널 제어 방법에 대한 기술적 설명
이 글에서는 <code>less</code>와 <code>fzf</code> 등의 도구가 어떻게 stdin 파이프를 통해 파일 목록을 처리하고, 제어 터미널인 <code>/dev/tty</code>를 사용하여 키보드 입력을 읽는지를 설명합니다. 또한, 각 프로세스가 터미널인지 검사를 수행하는 방법에 대해 다루고 있습니다.
Technical explanation about terminal control methods.
This article explains how tools like <code>less</code> and <code>fzf</code> handle file listings through stdin pipes while reading keyboard input via the controlling terminal <code>/dev/tty</code>. It also discusses how each process checks if its fd 0 and fd 1 are terminals.