home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- 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
- From: hlu@yoda.eecs.wsu.edu (H.J. Lu)
- Subject: Re: definition of fd_set is a trouble spot
- Message-ID: <1992Nov8.084243.7938@serval.net.wsu.edu>
- Sender: news@serval.net.wsu.edu (USENET News System)
- Organization: Washington State University
- References: <1992Nov8.073130.25220@daffy.cs.wisc.edu>
- Date: Sun, 8 Nov 92 08:42:43 GMT
- Lines: 32
-
- In article <1992Nov8.073130.25220@daffy.cs.wisc.edu> quale@spock.cs.wisc.edu (Doug Quale) writes:
- >The definition of fd_set in <linux/types.h> is a bit of a trouble spot.
- >BSD makes fd_set an integer array to allow more open files/process than
- >bits/word. Linux allows only 32 open files/process, so fd_set is made
- >an unsigned long.
- >
- >If I haven't bored you to death and you're with me this far, the problem
- >is that some programs expect fd_set to be an array, not a scalar. For
- >example, BSD rshd.c has the code sequence
- >
- > fd_set ready, readfrom;
- >
- > ...
- >
- > ready = readfrom;
- >
- >The intent is that ready be an alias for readfrom, but this won't work
- >if fd_set is a scalar as in Linux. (BSD documents fd_set as an array
- >in the man pages, so I would say that this coding is legitimate.)
- >
- >If it's not too late, we should kill two birds with one stone and make
- >fd_set an array. This would also permit more than 32 open files/process.
- >
- >--
- >Doug Quale
- >quale@saavik.cs.wisc.edu
-
- Linus, could you please take a look at <gnu/types.h>. Can we use fd
- stuff in it? That is one purpose I left them there.
-
-
- H.J.
-