4 ms·
Pipe: How the System Call That Ties Unix Together Came About
- ktpsns 7y agotl,dr; Ken Thompson invented them overnight in 1973 and everybody was happy afterwards. An original journal article is linked (http://emulator.pdp-11.org.ru/misc/1978.07_-_Bell_System_Technical_Journal.pdf http://emulator.pdp-11.org.ru/misc/1978.07_-_Bell_System_Tec...) which shows an example of pipes at page 25.
- yesenadam 7y agoFunny, I thought McIlroy invented them, in 1964...and the article confirms that.
- masonic 7y agoThe author keeps writing "system call" when he means shell directive for assigning stdout/stdin.
- zaat 7y agoIt is a system call and not a shell directive: https://en.wikipedia.org/wiki/Anonymous_pipe#Unix https://en.wikipedia.org/wiki/Anonymous_pipe#Unix Also, man pipe.
- masonic 7y agoThe use case in the article is piping stdout from one program to stdin of another in the shell, not using pipe(2). To wit: '... the symbol for pipes should instead be “|.” '
- zaat 7y agoAfter digging into it I came with this, which seems worth a submission on its own: https://brandonwamboldt.ca/how-linux-pipes-work-under-the-hood-1518/ https://brandonwamboldt.ca/how-linux-pipes-work-under-the-ho... Basically, the shell is using the pipe system call under the hood.