file descriptor vs file handle
Richard A. O'Keefe
ok at goanna.cs.rmit.oz.au
Thu Feb 28 13:34:18 AEST 1991
In article <4842 at goanna.cs.rmit.oz.au>, ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> > cwong at charlie.coyote.trw.com (Chun Wong) writes:
> > >Can someone distinguish the differences between a file descriptor and
> > >a file handle? I know that creat returns a file handle whereas fopen
> > >returns a file descriptor. What's the difference? Are they interchangeable?
I explained file-descriptor, path-name, and stdio-stream. I forgot to say
anything about "handle". OS/2 documentation uses the word "handle" to
mean exactly the same thing as UNIX means by "file descriptor". For
example, the thing DosOpen() returns via its second argument is a "handle",
which is a 16-bit integer, just as open() in UNIX returns an integer.
In fact, just as standard input, output, and error have file descriptors
0, 1, and 2 in UNIX, so STDIN, STDOUT, and STDERR are 0, 1, and 2 in OS/2.
"Handle" is used in other environments to mean a pointer to a pointer.
You Have Been Warned.
--
The purpose of advertising is to destroy the freedom of the market.
More information about the Comp.lang.c
mailing list