Menu

#2 _dbus_fd_set_close_on_exec implementation for win32

open
nobody
None
5
2010-01-12
2010-01-12
Anonymous
No

here's a patch that implements the _dbus_fd_set_close_on_exec() function using the win32 API.

This patch solves many cases of dbus objects not being unregistered even though the owning process has already exited, typicailly in situations where the process has launched a child process. This is because Windows inherits socket handles between parent and child processes by default, so the socket would remain connected until the last child has exited.

Patch compiled and tested with msvc2005, msvc2008, and mingw, on Windows Vista 64. However it should work for all versions of windows starting from win2k.

Discussion

  • Nobody/Anonymous

    patch for _dbus_fd_set_close_on_exec() for win32

     
  • Nobody/Anonymous

    Note that I've removed the obsolete DBusSocket code that was in there, I've checked and it's not used anywhere else.

    Oh and I've forgotten to mention who I was : Romain from KDAB. If you have questions you can reach me on #kde-windows on freenode, ping kromain ;)