ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/fdpass.C
(Generate patch)

Comparing rxvt-unicode/src/fdpass.C (file contents):
Revision 1.8 by root, Sun Jan 22 01:00:46 2006 UTC vs.
Revision 1.9 by root, Sun Jan 22 16:36:40 2006 UTC

33 33
34#ifndef CMSG_LEN // CMSG_SPACe && CMSG_LEN are rfc2292 extensions to unix 34#ifndef CMSG_LEN // CMSG_SPACe && CMSG_LEN are rfc2292 extensions to unix
35# define CMSG_LEN(len) (sizeof (cmsghdr) + len) 35# define CMSG_LEN(len) (sizeof (cmsghdr) + len)
36#endif 36#endif
37 37
38int 38bool
39ptytty::send_fd (int socket, int fd) 39ptytty::send_fd (int socket, int fd)
40{ 40{
41 msghdr msg; 41 msghdr msg;
42 iovec iov; 42 iovec iov;
43 char buf [CMSG_LEN (sizeof (int))]; 43 char buf [CMSG_LEN (sizeof (int))];
60 60
61 *(int *)CMSG_DATA (cmsg) = fd; 61 *(int *)CMSG_DATA (cmsg) = fd;
62 62
63 msg.msg_controllen = cmsg->cmsg_len; 63 msg.msg_controllen = cmsg->cmsg_len;
64 64
65 return sendmsg (socket, &msg, 0); 65 return sendmsg (socket, &msg, 0) >= 0;
66} 66}
67 67
68int 68int
69ptytty::recv_fd (int socket) 69ptytty::recv_fd (int socket)
70{ 70{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines