Conventional daemons

Barry Shein bzs%bostonu.csnet at csnet-relay.arpa
Sat Mar 29 05:37:13 AEST 1986


Well, when Cam came to me and asked why do they open "/" on
stdin/stdout I guess I came up with everything people have
been saying on the list (inode is in core anyhow, somehow
harmless) but rejected the list as being uncompelling although
I suspect some or all (probably the inode argument) were the
reasons.

The real question was, why open anything? Surely there's
nothing functionally useful about opening stdin/stdout on
"/" and it could be a potential hazard if ported. If you
want to open something 'useful' I would say either /dev/console
or a pipe to a syslogger (at least for output.) Maybe people
fear bugs in their programs (or routines they've loaded)
will magically start doing I/O (I believe there are still a
few routines around that will do their own perror() which is
a bug). Still seems weak. Maybe fears of inheriting a controlling
terminal.

It's just that it's ubiquitous, obviously someone did it that
way for whatever reason and it got copied over and over (which
is more or less what he was doing, using an existing daemon as
a model for a new one, a fine idea in general.)

Maybe rather than rationalizing the current kludge a useful
replacement could be suggested, it seems like an opportunity
(that is, no one will be sorry to see the opening of "/" go
away if it were replaced by something useful.)

Or maybe this is just arguing about how many angels will fit
on the head of a pin (the answer is 7.)

	-Barry Shein, Boston University



More information about the Comp.unix.wizards mailing list