TIL: File descriptor 3

Linux

There are three standard file descriptions, STDIN, STDOUT, and STDERR. They are assigned to 0, 1, and 2 respectively.

File descriptor 3, 4 and so on can be accessed at:

/proc/12345/fd/3

I found it when looking at this Patchset. Chromium open --remote-debugging-pipe at file descriptor 3 for output and file descriptor 4 for input.

Windows?

Author

I'm Oliver Nguyen. A software maker working mostly in Go and JavaScript. I enjoy learning and seeing a better version of myself each day. Occasionally spin off new open source projects. Share knowledge and thoughts during my journey. Connect with me on , , , and .

Back Back