Re: why file descriptor an int
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Wed, 07 Nov 2007 01:20:02 -0500
In article <fgrdj2$f13$1@xxxxxxxxxxxxx>,
"kkzhou" <kkzhou@xxxxxxxxxxxxxxxx> wrote:
oh, I meant that system calls such as "read(int filedes,..." have an int
parameter which
represents a system resource.
In my opinion, "read( fd_t filedes,.." may be better as an interface defined
by standard
The convention of using typedefs like this is pretty recent, only about
10 or so years old. The basic filesystem system calls are very old,
going back over 30 years. Although some of the traditional APIs have
been updated, file descriptors are often put in structures, so
programmers would have to redefine all these structures to accomodate
the change.
So I guess they decided that forcing a change like this would be more
trouble than it's worth.
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- References:
- Re: why file descriptor an int
- From: Casper H . S . ***
- Re: why file descriptor an int
- Prev by Date: Re: why file descriptor an int
- Next by Date: Re: why file descriptor an int
- Previous by thread: Re: why file descriptor an int
- Next by thread: Re: why file descriptor an int
- Index(es):