LOG_DBG ((LOG_SYSDEP, 90, "mm_receive_fd: recv %d", fd));
mm_receive_fd (int socket){  struct msghdr msg;  char tmp[CMSG_SPACE (sizeof (int))];  struct cmsghdr *cmsg;  struct iovec vec;  ssize_t n;  char ch;  int fd;  memset (&msg, 0, sizeof msg);  vec.iov_base = &ch;  vec.iov_len = 1;  msg.msg_iov = &vec;  msg.msg_iovlen = 1;  msg.msg_control = tmp;  msg.msg_controllen = sizeof tmp;  if ((n = recvmsg(socket, &msg, 0)) == -1)    {      log_error ("%s: recvmsg", __func__);      return -1;    }  if (n != 1)    {      log_error ("%s: recvmsg: expected received 1 got %ld", __func__,		 (long)n);      return -1;    }  cmsg = CMSG_FIRSTHDR (&msg);  if (cmsg->cmsg_type != SCM_RIGHTS)    {      log_error ("%s: expected type %d got %d", __func__, SCM_RIGHTS,		 cmsg->cmsg_type);      return -1;    }  fd = (*(int *)CMSG_DATA (cmsg));  return fd;}