This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

another daemon task


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]