This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
another daemon task
- To: <cygwin-developers at sourceware dot cygnus dot com>
- Subject: another daemon task
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Sat, 15 Sep 2001 22:45:30 +1000
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