/dev/null (was Re: Daemonizing question...)

Barry Margolin barmar at think.com
Tue Feb 26 16:45:18 AEST 1991


In article <6276 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
>>Apparently when the daemonizing code was written "/dev/null" (a more
>>likely candidate) was not gauranteed to exist under all flavors of
>>Unix (may still not for all I know ;-).
>
>It's not *guaranteed* to exist under *any* flavor of UNIX; somebody
>could have removed it, for example (see "comp.unix.aix", I think, for an
>example of a system bug that blows it away).
>
>It's *likely* to exist under all flavors of UNIX, including 4.xBSD,
>whence that daemonizing code came. 

While the system doesn't guarantee that /dev/null always exists, it is
certainly *expected* to exist, and most Unix systems are shipped or
initially installed with it.  I suspect many Unix systems wouldn't get very
far without it; I'm sure many vendor-supplied system-management shell
scripts reference it.

By a similar token, the system doesn't *guarantee* that /dev/kmem,
/dev/tty, /vmunix (or whatever the standard name for your kernel is),
/etc/rc, or /bin/login exist.  But they had better exist for the system to
run properly.

--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.internals mailing list