Re: [linux-audio-dev] shared memory problems

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] shared memory problems
From: Paul Davis (pbd_AT_Op.Net)
Date: Wed Nov 14 2001 - 03:38:24 EET


>> i wish there was a way force certain things to happen when a process
>> dies on SIGKILL, though. we can't call shmctl(id,IPC_RMID) on shm
>> segments until we know that no more clients will attempt to connect -
>> i.e. the server is exiting (because a "marked-destroyed" segment
>> cannot be accessed by a new task). thus, i defer this via
>> on_exit(). alas, these are not called if it dies with SIGKILL, and we
>> end up with "persistent" shm segments. sigh. at least i can handle all
>> other signals properly.
>
>Well, its easy to do this. Just have the server do a fork() early at
>startup time, have the new process be the server and the parent just
>waiting on the server and doing necessary cleanup. Just like X does
>with Xwrapper.

sounds great. except that also means defining some IPC protocol so
that the server can tell the wrapper about shm resources and files
that need to be released, right? they're not in the same address
space.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Nov 14 2001 - 03:35:08 EET