#include #include #include "fdop.h" int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa) { posix_spawn_file_actions_t *next, *p; if (fa->__actions) { p = fa->__actions; p = p->__actions; while (p != fa->__actions) { next = p->__actions; free(p); p = next; } free(fa->__actions); } return 0; }