home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 16030 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.6 KB  |  44 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!rpi!usenet.coe.montana.edu!news.u.washington.edu!serval!yoda.eecs.wsu.edu!hlu
  3. From: hlu@yoda.eecs.wsu.edu (H.J. Lu)
  4. Subject: Re: definition of fd_set is a trouble spot
  5. Message-ID: <1992Nov8.084243.7938@serval.net.wsu.edu>
  6. Sender: news@serval.net.wsu.edu (USENET News System)
  7. Organization: Washington State University
  8. References: <1992Nov8.073130.25220@daffy.cs.wisc.edu>
  9. Date: Sun, 8 Nov 92 08:42:43 GMT
  10. Lines: 32
  11.  
  12. In article <1992Nov8.073130.25220@daffy.cs.wisc.edu> quale@spock.cs.wisc.edu (Doug Quale) writes:
  13. >The definition of fd_set in <linux/types.h> is a bit of a trouble spot.
  14. >BSD makes fd_set an integer array to allow more open files/process than
  15. >bits/word.  Linux allows only 32 open files/process, so fd_set is made
  16. >an unsigned long.
  17. >
  18. >If I haven't bored you to death and you're with me this far, the problem
  19. >is that some programs expect fd_set to be an array, not a scalar.  For
  20. >example, BSD rshd.c has the code sequence
  21. >
  22. >    fd_set ready, readfrom;
  23. >
  24. >    ...
  25. >
  26. >    ready = readfrom;
  27. >
  28. >The intent is that ready be an alias for readfrom, but this won't work
  29. >if fd_set is a scalar as in Linux.  (BSD documents fd_set as an array
  30. >in the man pages, so I would say that this coding is legitimate.)
  31. >
  32. >If it's not too late, we should kill two birds with one stone and make
  33. >fd_set an array.  This would also permit more than 32 open files/process.
  34. >
  35. >-- 
  36. >Doug Quale
  37. >quale@saavik.cs.wisc.edu
  38.  
  39. Linus, could you please take a look at <gnu/types.h>. Can we use fd
  40. stuff in it? That is one purpose I left them there.
  41.  
  42.  
  43. H.J.
  44.