New answers tagged

2

The question is based on a misconception about the generality of proc filesystems. Systems which implement this (such as Solaris and Linux) have special devices which may be used for scripting, including /dev/fd followed by a file descriptor (number). With Solaris, /dev/fd is a virtual folder under /dev, while Linux uses a symbolic link to /proc into a (...


4

Those are artificial file descriptors and are certainly not needed for processing, which explains that they were not there historically and still absent on some systems. The shell handles these standard file descriptors based on your TTY. When the shell is started, it calls isatty(), and if it is (a TTY) it opens the standard file descriptors on it ...



Top 50 recent answers are included