Path: utzoo!attcan!uunet!bria!mike Newsgroups: comp.lang.c Subject: Re: file descriptor vs file handle Message-ID: <485@bria> Date: 27 Feb 91 21:24:46 GMT References: <90361.145855COS99291@ufrj.bitnet> <27C9CB35.5F7@wilbur.coyote.trw.com> <1991Feb26.101038.1@dev8n.mdcbbs.com> Reply-To: uunet!bria!mike Organization: MGI Group International, Los Angeles, CA Lines: 29 Followup-To: Keywords: Egads! Such a difference in opinion over such a simple little thing. Tis truly amazing. Anyhow, from the traditional school of thought: 1. When one refers to "handles" and "descriptors" in the classic sense, you are talking about the *same* thing: a non-negative integer that is an index into a table of open files local to the process (children may inherit descriptors from their parent upon their creation; its up to the parent process to decide this.) Various implementations of an operating system may change this. Not all operating systems grok this. This is system dependant, and could be a Bad Thing if you are worried about portability to "strange" operating systems. 2. The pointer that is returned by fopen() is a file _stream_ pointer. Not handle. Not descriptor. Not R4 STREAM either. Stream. The whole point there was to isolate the programmer from some of the dependancies of the underlying OS. As a point of honour: The concept of the file descriptor did NOT originate with that black sheep known as DOS, nor that vile program loader known as CP/M. It probably predates UNIX (circa 1969). -- Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own. Title of the week: Systems Engineer | UUCP: ...!uunet!bria!mike ------------------------------------------------------------------------------- Remember folks: If you can't flame MS-DOS, then what _can_ you flame?