Re: signed short fd - Mailing list pgsql-hackers

From pgsql@mohawksoft.com
Subject Re: signed short fd
Date
Msg-id 16480.24.91.171.78.1110835522.squirrel@mail.mohawksoft.com
Whole thread Raw
In response to Re: signed short fd  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: signed short fd
Re: signed short fd
List pgsql-hackers
> My copy of APUE says on page 49: "The file descriptor returned by open
> is the lowest numbered unused descriptor. This is used by some
> applications to open a new file on standard input, standard output, or
> standard error."

Yes, I'll restate my questions:

What is meant by "unused?" Is it read to mean that a higher number file is
*never* returned if there is a lower number that has been used and is now
available? Is that something we can 100% absolutely depend on. On All
curent and future platforms?

It is a stupid idea to truncate the upper bytes of an integer without good
reason. I can see LOTS of reasons why this will break something in the
future. The upper bits may be used to identify storage media or
characteristics.

My point is that the spec calls for an "int," PostgreSQL should use an int.

>
> Unless someone can show there's an actual problem this discussion seems
> quite pointless.
>

The point is that this *is* silly, but I am at a loss to understand why it
isn't a no-brainer to change. Why is there a fight over a trivial change
which will ensure that PostgreSQL aligns to the documented behavior of
"open()"



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: signed short fd
Next
From: Neil Conway
Date:
Subject: Re: signed short fd