Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Message-ID: <007401c13de4$4e81ece0$0200a8c0@lifelesswks> From: "Robert Collins" To: Subject: another daemon task Date: Sat, 15 Sep 2001 22:45:30 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 15 Sep 2001 12:32:14.0105 (UTC) FILETIME=[72CD6090:01C13DE2] tracking process exits... For IPC we have to decrement a counter when exit () is called or a process dies. That means that we have to do it _no matter what_. So I propose that the daemon have a handle for every cygwin process, and that that IPC functionality, + any similar things that crop up (ie the FIFO readers tracking potential bug I had a long time back) be cleaned up by having a dedicated thread that simply waits on all the process HANDLE's and an additional event, and when a process quits calls a cleanup function. Any daemon request that means that cleanup may be needed simply records what needs cleaning up. Thoughts? Also, whats the best way to hand the process over? ie, should the process create a handle and duplicate it to the daemon? Or does the daemon open the process via the winpid and obtain the handle? (Not all transports will tell us the thread calling us, so we can't expect the transport to tell us). Rob