- if (sendmsg(socket, &msg, 0) == -1)
- fatal("%s: sendmsg(%d)", __FUNCTION__, fd);
+ if ((n = sendmsg(sock, &msg, 0)) == -1)
+ fatal("%s: sendmsg(%d): %s", __func__, fd,
+ strerror(errno));
+ if (n != 1)
+ fatal("%s: sendmsg: expected sent 1 got %ld",
+ __func__, (long)n);
+#else
+ fatal("%s: UsePrivilegeSeparation=yes not supported",
+ __func__);
+#endif