Hello all,
I'm a little confused by the concept of stdin, stdout, stderr and their file descriptors.
On the whole I understand but what I can't work out is this; if each process gets three streams when it's initialised, and by default they point to the controlling terminal, how is it that they are able to be represented by the file descriptors 0, 1 and 2?
I would think each stream for each individual process would need it's own file descriptor because they could connect to different terminals?
Are stdin, out and err basically three streams that are shared by multiple processes?
I hope that makes sense
Bookmarks