home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!van-bc!microplex.com!fff
- From: fff@microplex.com (Fred Fierling)
- Subject: /dev/null and file locking
- Message-ID: <1992Dec15.233957.1147@microplex.com>
- Organization: Microplex Systems Ltd
- Distribution: na
- Date: Tue, 15 Dec 1992 23:39:57 GMT
- Lines: 22
-
- Is it kosher to mknod a device that has the same major and minor numbers as
- /dev/null? For example, given:
-
- $ ls -l /dev/null
- crw-rw-rw- 1 root sys 4, 2 Dec 15 15:21 /dev/null
-
- Can I:
-
- mknod /dev/another_null c 4 2
-
- Can two processes write both these devices simultaneously without problems?
- What happens when two processes try to lock /dev/null and /dev/another_null?
-
- My guess is the locking is done at the inode level and each will have a
- successful lock. I've tried the mknod command under SCO Unix and it seems
- to work as expected, but will this work for all flavours of Unix?
-
- Sincere apologies if these questions are trite or trivial to the august
- readership of this newsgroup. :-)
- --
- Fred Fierling fff@microplex.com Tel: 604 875-1461 Fax: 604 875-9029
- Microplex Systems Ltd 265 East 1st Avenue Vancouver, BC V5T 1A7, Canada
-