Redirection in /etc/rc

Ed Gould ed at mtxinu.UUCP
Tue Mar 25 08:51:05 AEST 1986


>    In BSD4.2, is there any good reason why /etc/rc shouldn't
>    have an "exec >/dev/console 2>1" at the top, and punt all
>    those line-by-line redirections throughout it and rc.local?

YES!  Some - perhaps most - of the daemons started by /etc/rc assume
that they don't have a controlling terminal.  Doing what you suggest
would give them one.  Many of them will fail miserably, or at least
cause their children that open a tty and expect *that* to be their
controlling terminal to fail.  These failures are often subtle and
difficult to diagnose.

There's no fundamental reason, now that there is a mechanism by which a
process can divest itself of its controlling terminal, that this need
continue.  It seems wise, though, in the interest of portability, to
assume that processes don't necessarily have this ability, and therefore
not to use it unless necessary.

-- 
Ed Gould                    mt Xinu, 2910 Seventh St., Berkeley, CA  94710  USA
{ucbvax,decvax}!mtxinu!ed   +1 415 644 0146

"A man of quality is not threatened by a woman of equality."



More information about the Comp.unix.wizards mailing list