| 108 | } |
| 109 | |
| 110 | static void clear_child_for_cleanup(pid_t pid) |
| 111 | { |
| 112 | struct child_to_clean **pp; |
| 113 | |
| 114 | for (pp = &children_to_clean; *pp; pp = &(*pp)->next) { |
| 115 | struct child_to_clean *clean_me = *pp; |
| 116 | |
| 117 | if (clean_me->pid == pid) { |
| 118 | *pp = clean_me->next; |
| 119 | free(clean_me); |
| 120 | return; |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | static inline void close_pair(int fd[2]) |
| 126 | { |