Issue with _dbus_write_socket on windows
Havoc Pennington
hp at redhat.com
Fri Nov 17 09:04:14 PST 2006
Christian Ehrlicher wrote:
> Hi,
>
> Yesterday we found a problem with _dbus_write_socket() on windows. The comment to this function is:
> * Like _dbus_write(), but only supports sockets
> * and is thus available on Windows.
>
> But I found no function to write a fd. Only unix has a function _dbus_write(), but it's not internal public (only declared in dbus-sysdeps-unix.h).
> -> We need to move _dbus_write() to dbus-sysdeps.h/.c (no need for special win32 version afaics) and use this function in bus/bus.c:633 and other similar places to avoid crashes on windows.
>
> Is my assumption correct or do I miss something here?
>
The whole point is that on Windows, a socket and a file handle are
different, so uses of _dbus_write that are not to a socket do not make
sense.
The two places you changed in the later patch to use _dbus_write_stream
are printing to a file descriptor passed in from a parent process after
a fork(). It does not make any sense to do that on Windows AFAIK. So why
are you trying to make that work on Windows?
On Windows, the bus daemon probably should not have those two command
line options, since they do something UNIX-specific.
Havoc
More information about the dbus
mailing list