Re: Nameless IPC on POSIX systems

From: des(at)des(dot)no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Nameless IPC on POSIX systems
Date: 2005-05-06 20:38:11
Message-ID: 86psw4ytsc.fsf@xps.des.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

DES
--
Dag-Erling Smørgrav - des(at)des(dot)no

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-05-06 20:50:36 Re: Nameless IPC on POSIX systems
Previous Message Tom Lane 2005-05-06 19:51:24 Re: Nameless IPC on POSIX systems