ipc_fd_transfer.h 510 B

12345678910111213141516171819
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #include <sys/wait.h>
  10. #include <sys/types.h>
  11. #include <sys/socket.h>
  12. #include <sys/un.h>
  13. union {
  14. struct cmsghdr cm; // control msg
  15. char ctl[CMSG_SPACE(sizeof(int))]; // the pointer of char
  16. } ctl_un;