Re: signed short fd

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема Re: signed short fd
Дата
Msg-id 20050315030406.GA21515@penne.toroid.org
обсуждение исходный текст
Ответ на Re: signed short fd  (pgsql@mohawksoft.com)
Список pgsql-hackers
At 2005-03-14 16:25:22 -0500, pgsql@mohawksoft.com wrote:
>
> > "The file descriptor returned by open is the lowest numbered unused
> > descriptor. [...]
> 
> What is meant by "unused?"

Perhaps you should actually look at the standard.
 "The open( ) function shall return a file descriptor for the named file that is the lowest file descriptor not
currentlyopen for that process."
 
 "The close( ) function shall deallocate the file descriptor indicated by fildes. To deallocate means to make the file
descriptoravailable for return by subsequent calls to open( ) or other functions that allocate file descriptors."
 

> 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?

Yes.

-- ams


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: signed short fd
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: signed short fd