dbus-sysdeps-unix.h
Thiago Macieira
thiago at kde.org
Wed Sep 13 04:22:02 PDT 2006
Peter Kümmel wrote:
>But I don't knoow what to do with
>void _dbus_fd_set_close_on_exec (int fd);
>
>Is this also a socket-only function or is it also
>used to close files?
On Unix, it's used for anything file descriptor. On D-Bus, I think we use
it for pipes only.
However, I don't think you'll need it on Windows, because of the proper
spawn* functions, that are missing on Unix (the only way to properly tell
if a program started after exec* is to have a close-on-exec pipe).
>While doing the renaming I had the idea to change
>_dbus_close(int fd, int) to _dbus_close(int *fd, int)
>and to set *fd = -1 when the closing was successful,
>so fd has a actual value.
You'd prevent things like _dbus_close(0), that closes stdin.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060913/4467b310/attachment.pgp
More information about the dbus
mailing list