apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler MacDonald <ty...@yi.org>
Subject RFC: graceful handling of abandoned shared memory
Date Tue, 25 Apr 2006 00:04:53 GMT
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.

	Cheers,
		Tyler


Mime
View raw message