Thread View: fa.unix-wizards
1 messages
1 total messages
Started by ucbvaxunix-wizards
Sun, 27 Dec 1981 11:42
/etc/rc: stdin/stdout/stderr to /dev/console?
Author: ucbvaxunix-wizards
Date: Sun, 27 Dec 1981 11:42
Date: Sun, 27 Dec 1981 11:42
18 lines
998 bytes
998 bytes
>From wales@UCLA-Security Sun Dec 27 11:29:23 1981
We are running 4.1bsd on VAXen. A perusal of the "init" code shows that,
just before invoking /etc/rc, files 0-2 (stdin, stdout, stderr) are opened
on the file "/" as follows:
open ("/", 0); dup (0); dup (0);
The reason for this is not immediately obvious to me.
(1) If the purpose is to close off input and output on /etc/rc, why not
open "/dev/null" instead of "/"?
(2) Processes forked from /etc/rc still appear to respond to the console.
For example, if I do a rubout during "fsck -p > /dev/console", the
"fsck" program goes away.
(3) Almost every line in /etc/rc has "> /dev/console" on it. Why not
simply set up /dev/console as the stdin/stdout/stderr of /etc/rc?
-- Rich
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads