-/* $Id$ */
-
/***
This file is part of avahi.
NULL,
"/etc/resolv.conf",
#ifdef HAVE_DBUS
- AVAHI_DBUS_INTROSPECTION_DIR"/Server.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/EntryGroup.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/AddressResolver.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/DomainBrowser.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/HostNameResolver.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/ServiceBrowser.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/ServiceResolver.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/ServiceTypeBrowser.introspect",
- AVAHI_DBUS_INTROSPECTION_DIR"/RecordBrowser.introspect",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.Server.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.EntryGroup.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.AddressResolver.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.DomainBrowser.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.HostNameResolver.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.ServiceBrowser.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.ServiceResolver.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.ServiceTypeBrowser.xml",
+ AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.RecordBrowser.xml",
#endif
NULL,
NULL
struct iovec iov;
struct msghdr msg;
union {
- struct cmsghdr hdr;
- char buf[CMSG_SPACE(sizeof(int))];
+ struct cmsghdr hdr;
+ char buf[CMSG_SPACE(sizeof(int))];
} cmsg;
/* Send a file descriptor over the socket */
struct iovec iov;
struct msghdr msg;
union {
- struct cmsghdr hdr;
- char buf[CMSG_SPACE(sizeof(int))];
+ struct cmsghdr hdr;
+ char buf[CMSG_SPACE(sizeof(int))];
} cmsg;
/* Receive a file descriptor from a socket */
return -1;
} else if (pid == 0) {
- setsid();
-
/* Drop all remaining capabilities */
avahi_caps_drop_all();
return -1;
}
- if (write(helper_fd, &command, sizeof(command)) < 0) {
+ if (write(helper_fd, &command, sizeof(command)) < 0 &&
+ (errno != EPIPE && errno != ECONNRESET)) {
avahi_log_error("write() failed: %s\n", strerror(errno));
return -1;
}
- if ((r = read(helper_fd, &c, sizeof(c))) < 0) {
+ if ((r = read(helper_fd, &c, sizeof(c))) < 0 &&
+ (errno != EPIPE && errno != ECONNRESET)) {
avahi_log_error("read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
return -1;
}