45#include "blocxx/BLOCXX_config.h"
51#ifdef BLOCXX_HAVE_SYS_SOCKET_H
52#include <sys/socket.h>
57#include "blocxx/WinProcessUtils.hpp"
186#ifdef BLOCXX_HAVE_MSGHDR_MSG_CONTROL
192#define CMSG_LEN(size) (sizeof(struct cmsghdr) + (size))
196#define CMSG_SPACE(size) (sizeof(struct cmsghdr) + (size))
223 msg.msg_accrightslen =
sizeof(
int);
230 iov[0].iov_base = dummy;
244#ifdef BLOCXX_HAVE_MSGHDR_MSG_CONTROL
262 msg.msg_accrightslen =
sizeof(
int);
268 char dummy[1] = {
'\x7F' };
269 iov[0].iov_base = dummy;
278 "unexpected end of input when receiving handle");
294#ifdef BLOCXX_HAVE_MSGHDR_MSG_CONTROL
299 "missing control message when receiving handle");
302#if !defined (BLOCXX_HPUX)
306 "cmptr->cmsg_len != CMSG_LEN(sizeof(int)) when receiving handle");
312 "control level != SOL_SOCKET when receiving handle");
317 "control type != SCM_RIGHTS when receiving handle");
321 if (
msg.msg_accrightslen !=
sizeof(
int))
324 "bad control message when receiving handle");
#define BLOCXX_INVALID_HANDLE
PURPOSE: The AutoResource class template is an analog of std::auto_ptr for managing arbitrary resourc...
AutoDescriptor receiveDescriptor(Descriptor streamPipe)
Gets a Descriptor from the peer.
int passDescriptor(Descriptor streamPipe, Descriptor descriptor, ProcId targetProcessId)
Sends a Descriptor to the peer.
bool operator==(const Array< T > &x, const Array< T > &y)
AutoResource< AutoDescriptorPolicy > AutoDescriptor
An analog of std::auto_ptr for descriptors.