home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 138 / text0000.txt < prev   
Encoding:
Text File  |  1990-12-05  |  1.7 KB  |  39 lines

  1. Submitted-by: chip@tct.uucp (Chip Salzenberg)
  2.  
  3. According to brnstnd@kramden.acf.nyu.edu (Dan Bernstein):
  4. >The underlying principle is that everything is a file *descriptor*.
  5.  
  6. No one disputes the significance of file descriptors.
  7.  
  8. Nevertheless, it is important not to underestimate the simplification
  9. gained by using one namespace for all objects -- files, devices,
  10. processes, hosts, IPC entities, etc.  A filesystem is good for files,
  11. but a namespace is good for everything.  And if an object has a name,
  12. and you want a file descriptor referring to that object, why invent a
  13. new system call?  I'd rather continue using open().
  14.  
  15. >In reality, you initiate a network stream connection in two stages.
  16. >First you send off a request, which wends its way through the network.
  17. >*Some time later*, the response arrives.
  18.  
  19. This situation is easily modeled with open() and O_NDELAY.  Compare
  20. the way Unix opens a modem control tty.  Normally, the open() call
  21. will block until the carrier detect line is asserted.  However, the
  22. O_NDELAY parameter to open() avoid the blockage.
  23.  
  24. Likewise, an open() on a TCP connection would block until the
  25. connection succeeds or fails.  However, the O_NDELAY parameter would
  26. allow the program to continue immediately, with provisional status of
  27. "success".  The program could come back and check on the open() status
  28. later, perhaps with an fcntl() call.
  29.  
  30. Devices are well-entrenched residents of the filesystem namespace.  So
  31. far, all proposed reasons for keeping network connections out of the
  32. filesystem would apply equally to devices.  Do we really want to leave
  33. the filesytem free of everything except files?  That way lay CP/M.
  34. -- 
  35. Chip Salzenberg at Teltronics/TCT     <chip@tct.uucp>, <uunet!pdn!tct!chip>
  36.  
  37. Volume-Number: Volume 21, Number 138
  38.  
  39.