mardi 6 janvier 2015

Confusion on understanding pipes and streams?


I read about pipes and streams and I’m still confused on how it’s implemented.


A program is started and it reads data from “standard input” stream (stdin), which is where the keyboard sends data to.


My question is, how is that different from a pipe? Piping allows me to have a process that sends data to a pipe, and another process is reading data from it.


When the keyboard is pressed, data is sent to stdin and a program is reading data from this same stream.


A "read" operation is executed as soon as data is sent to this stream.



Aucun commentaire:

Enregistrer un commentaire