[Mono-devel-list] Patch for shared handle daemon shown up by xsp on Solaris
Bernie Solomon
bernard at ugsolutions.com
Thu Dec 11 16:39:45 EST 2003
I am not quite sure why but trying to get xsp going on Solaris has highlit a
problem in the shared handle daemon that the client channels were not being
removed from glib's event loop as they got shutdown, On Solaris you got an
error event for a bad file descriptor after the first rem_fd which then
tried to do the rem_fd again but the clients handle array was already NULL
causing the daemon to die. So this patch removes the input source when the
IO channel is shut down and then the error event never happens. I haven't
tried it on Linux yet where I can only presume you just get dead channels
which take space but don't cause spurious events. I can test this later to
check Linux is still OK but thought I'd send the patch out now.
Now this meant keeping track of the ID Glib returns from g_io_add_watch so
it could be sent back into g_source_remove. In order to do this I change the
per file desciptor data structure into a struct to contain the ID and the
array of open handles. Then to keep things consistent I pass around a
pointer to this struct in most cases rather than the array of handles (maybe
other per client data can be added to this struct). This means the patch
looks quite large but the changes are mainly due to the data structure
change.
Anyway I thought I'd submit for review and confirmation it is OK to commit
(I assume Dick should review this).
Bernie
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: daemon.diffs.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20031211/3cec3a55/attachment.txt
More information about the Mono-devel-list
mailing list