posix_spawn_file_actions_destroy.c 244 B

1234567891011121314
  1. #include <spawn.h>
  2. #include <stdlib.h>
  3. #include "fdop.h"
  4. int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa)
  5. {
  6. struct fdop *op = fa->__actions, *next;
  7. while (op) {
  8. next = op->next;
  9. free(op);
  10. op = next;
  11. }
  12. return 0;
  13. }