🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Hae Hirdler Fri, 01 Dec 1989 03:27
correction to the last message (References: 713@mbf.UUCP)
#146
Author: Hae Hirdler
Date: Fri, 01 Dec 1989 03:27
24 lines
1242 bytes

In article <713@mbf.UUCP>, hae@mbf.UUCP I wrote:

Subject: AT&T system V fdopen mode checking
> The man page on the fdopen states that "the type of the stream must 
> agree with the mode of the open file."  But, when a file is open()'ed
> ( fd= open (filename, oflag) ), and fdopen()'ed for a stream 
> ( fptr= fdopen (fd, mode) ), it allows this open file to be opened for 
> any type of a stream regardless of the type of oflag already open()'ed. 
> For example, fd= open(filename, O_RDONLY); fptr= fdopen(filename, "w")
> will return a NON_NULL fptr value instead of NULL.  
> 
> The semantics of the man page on the fdopen seems to indicate that 
> this should not be allowed. (return NULL)  
> 
> Is this a known bug?  or what?

CORRECTION:  The fptr= fdopen(filename, "w") should have been
		   fptr= fdopen (fd, "w").

Sorry, to the world!!

	- hae hirdler
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads