spawn_int.h 428 B

1234567891011121314151617181920212223242526
  1. /* Data structure to contain the action information. */
  2. struct __spawn_action {
  3. enum {
  4. spawn_do_close,
  5. spawn_do_dup2,
  6. spawn_do_open
  7. } tag;
  8. union {
  9. struct {
  10. int fd;
  11. } close_action;
  12. struct {
  13. int fd;
  14. int newfd;
  15. } dup2_action;
  16. struct {
  17. int fd;
  18. const char *path;
  19. int oflag;
  20. mode_t mode;
  21. } open_action;
  22. } action;
  23. };
  24. int __posix_spawn_file_actions_realloc(posix_spawn_file_actions_t *fa);