Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!unisoft!greywolf From: greywolf@unisoft.UUCP (The Grey Wolf) Newsgroups: comp.unix.internals Subject: Re: /dev/null (was Re: Daemonizing question...) Keywords: daemon, open Message-ID: <3411@unisoft.UUCP> Date: 4 Mar 91 23:53:30 GMT References: <12459@helios.TAMU.EDU> <12497@helios.TAMU.EDU> <6276@auspex.auspex.com> <1991Feb26.054518.25282@Think.COM> <2974@cirrusl.UUCP> Reply-To: greywolf@unisoft.UUCP (The Grey Wolf) Organization: Foo Bar and Grill Lines: 32 <2974@cirrusl.UUCP> by dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) # If you ever lose /dev/null, you can always restore it from a backup. # (You *do* back up /dev/null often, don't you?) # # Actually, I'm not joking. The last time I lost /dev/null, I was unable # to find its major/minor numbers in the vendor-supplied documentation, # so I simply restored it from a backup. Well, you can look in your local conf.c or config.c file somewhere in /usr(/src)/sys (depending on whether or not you have source), and look in the cdevsw[] array. You can look at /dev/mem and /dev/kmem. Chances are pretty good that the major number for /dev/null is the same as those two; the minor number is (usually) one greater than /dev/kmem. #define SARCASM You can always try atlarge# cd /dev atlarge# sh -x ./MAKEDEV #undef SARCASM /* MAKEDEV is a Berkelefication */ # -- # Rahul Dhesi # UUCP: oliveb!cirrusl!dhesi -- # The days of the computer priesthood are not over. # May they never be. # If it sounds selfish, consider how most companies stay in business.