apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: RFC: graceful handling of abandoned shared memory
Date Tue, 25 Apr 2006 22:14:21 GMT
On 4/24/06, Tyler MacDonald <tyler@yi.org> wrote:
> This patch makes dealing with SysV IPC shared memory a bit easier:
>
>         - If a shared memory segment exists with the key that you want, a
> check is performed to see if anybody else is using it. If not, then it's
> assumed that the segment is a result of an unclean shutdown of a process,
> and we attach to that segment instead of creating our own new one.
>
> This patch still requires that the file that the named memory segment is
> bound to does not exist, but it *does* ensure that if the file is removed,
> you can usually get your memory segment back and your program won't fail to
> start up because of a poor choice in shared memory implementation. ;-) This
> brings the SysV IPC shmem stuff in APR a lot closer to behaving the same as
> the mmap() implementation. Please let me know what you think.

This seems reasonable to me, modulo a few formatting issues, but I'm
not especially familiar with SysV IPC, so if someone with more of a
clue could take a look I'd appreciate it.

-garrett

Mime
View raw message