| От | Tom Lane |
|---|---|
| Тема | Re: Nameless IPC on POSIX systems |
| Дата | |
| Msg-id | 18575.1115412636@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Nameless IPC on POSIX systems (des@des.no (Dag-Erling Smørgrav)) |
| Список | pgsql-patches |
des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> The check we need is "are there any other processes (still) attached to
>> this shmem" and AFAIK that is not available in the mmap API. Do you
>> know how to get it?
> You can hack something up with fcntl() locks. If a process has a
> shared lock on the shm file, F_GETLK will get you its pid. Then grab
> your own shared lock.
Seems fairly race-condition-prone: what about recently spawned child
processes that haven't yet taken their own locks? If I read the fork()
page correctly, a forked child doesn't inherit any file locks.
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера