home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / wizards / 5241 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.1 KB  |  33 lines

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