delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <0a9801c1a079$4dd50e60$0200a8c0@lifelesswks> |
From: | "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au> |
To: | "Michael Haubenwallner" <michael DOT haubenwallner AT salomon DOT at>, |
"Charles Wilson" <cwilson AT ece DOT gatech DOT edu> | |
Cc: | <cygwin AT cygwin DOT com> |
References: | <3C482133 DOT E3C673D2 AT salomon DOT at> |
Subject: | Re: cygipc-1.11 SHM-patch: fork, handling in ipc-daemon |
Date: | Sat, 19 Jan 2002 10:38:58 +1100 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
X-OriginalArrivalTime: | 18 Jan 2002 23:40:58.0656 (UTC) FILETIME=[9488BA00:01C1A079] |
=== ----- Original Message ----- From: "Michael Haubenwallner" <michael DOT haubenwallner AT salomon DOT at> > - It is not clear what happens in following circumstance: > 1) the first process creates a shm > 2) a second one attaches to it > 3) now the second process dies without detaching > 4) the first process removes the shm with shmctl(IPC_RMID), > but the ipc-daemon was sleeping and did not remove the > second attachment-entry early enough to have shm_nattch==0, > which must be the case in shmctl() to really remove the shm > by the caller of shmctl(IPC_RMID). > > What IMHO surely not should happen is that a shmid with > shm_nattch==0 remains with having the destroy-flag set. > So the ipc-daemon must remove a shm in this state, > including the tmp-file. In this case, the daemon should wait on all the processes that are attached, so it gets woken up when a process quits. Alternatively, you could queue the removal, prevent now attachments, and when the second process termination is 'noticed' perform the removal. Rob -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |