- Timestamp:
- 2016-09-24T20:14:34Z (8 years ago)
- Children:
- ba52ac5
- Parents:
- 63cad66 (diff), 82cb190 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ipc.c
r63cad66 r3fbce97 590 590 } 591 591 592 *recv_fd = *(int *) CMSG_DATA(cmsg);592 memcpy(recv_fd, CMSG_DATA(cmsg), sizeof(int)); 593 593 /* 594 594 fprintf( stderr, "pid %d received fd %d\n", (int) getpid(), *recv_fd ); … … 758 758 cmsg->cmsg_type = SCM_RIGHTS; 759 759 cmsg->cmsg_len = CMSG_LEN(sizeof(send_fd)); 760 *(int *) CMSG_DATA(cmsg) = send_fd;760 memcpy(CMSG_DATA(cmsg), &send_fd, sizeof(int)); 761 761 msg.msg_controllen = cmsg->cmsg_len; 762 762 #endif
Note: See TracChangeset
for help on using the changeset viewer.