1

http://www.di.uevora.pt/~lmr/syscalls.html In that reference about system calls, appears a function called dup(). It is said that it duplicates channels. Then my question is, what is a channel?

Anthon
  • 79,293
J L
  • 125
  • 1
    From earlier on the same page under the heading "File Structure Related System Calls": "A channel is a connection between a process and a file that appears to the process as an unformatted stream of bytes", i.e. this includes regular files, but also sockets, pipes, FIFOs etc. – Thomas Nyman Oct 03 '13 at 10:42
  • Omg sorry, I was reading kind of diagonal because I have an absolutely ridiculous volume of material to learn now... Thank you very much. May you post it as an answer? – J L Oct 03 '13 at 10:44
  • 1
    Happy to oblige. Added the quote as an answer. – Thomas Nyman Oct 03 '13 at 11:00

1 Answers1

4

The meaning of the term channel is explained earlier on the same page under the heading "File Structure Related System Calls":

A channel is a connection between a process and a file that appears to the process as an unformatted stream of bytes

As in Unix "Everything is a file", this includes file descriptors to regular files, but also different kinds of sockets, pipes, FIFOs etc.

Thomas Nyman
  • 30,502