Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.bugs.sys5 Subject: Re: AT&T system V fdopen mode checking Message-ID: <11723@smoke.BRL.MIL> Date: 2 Dec 89 00:59:46 GMT References: <713@mbf.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <713@mbf.UUCP> hae@mbf.UUCP (Hae Hirdler) writes: -The man page on the fdopen states that "the type of the stream must -agree with the mode of the open file." I believe by "mode" they mean "file access permissions". -For example, fd= open(filename, O_RDONLY); fptr= fdopen(filename, "w") -will return a NON_NULL fptr value instead of NULL. O_RDONLY has nothing to do with the file. It is just a parameter to open().