2002-03-04 Robert Collins <rbtcollins@hotmail.com>
* cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH. * shm.cc (shmdt): Implement.
This commit is contained in:
@ -290,6 +290,26 @@ client_request_shm::serve (transport_layer_base * conn, process_cache * cache)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Someone detached */
|
||||
if (parameters.in.type == SHM_DETACH)
|
||||
{
|
||||
shmnode *tempnode = shm_head;
|
||||
while (tempnode)
|
||||
{
|
||||
if (tempnode->shm_id == parameters.in.shm_id)
|
||||
{
|
||||
InterlockedDecrement (&tempnode->shmds->shm_nattch);
|
||||
header.error_code = 0;
|
||||
CloseHandle (token_handle);
|
||||
return;
|
||||
}
|
||||
tempnode = tempnode->next;
|
||||
}
|
||||
header.error_code = EINVAL;
|
||||
CloseHandle (token_handle);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Someone wants the ID removed. */
|
||||
if (parameters.in.type == SHM_DEL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user