version 1.29, 2001/11/21 15:26:39 |
version 1.30, 2001/11/21 20:41:55 |
|
|
if (child_freelist) { |
if (child_freelist) { |
*cpp = child_freelist; |
*cpp = child_freelist; |
child_freelist = (*cpp)->link; |
child_freelist = (*cpp)->link; |
} else |
} else { |
*cpp = (struct child *)malloc(sizeof(struct child)); |
*cpp = (struct child *)malloc(sizeof(struct child)); |
|
if (*cpp == NULL) |
|
errx(1, "Out of memory"); |
|
} |
(*cpp)->pid = pid; |
(*cpp)->pid = pid; |
(*cpp)->done = (*cpp)->free = 0; |
(*cpp)->done = (*cpp)->free = 0; |
(*cpp)->link = NULL; |
(*cpp)->link = NULL; |