Attempt to further improve fish's handling when it runs out of fds, and plug some fd leaks

This commit is contained in:
ridiculousfish
2013-01-30 03:08:06 -08:00
parent 1879dc4b59
commit 3f8baeba20
2 changed files with 54 additions and 46 deletions

View File

@@ -409,7 +409,7 @@ static void mark_process_status(const job_t *j,
void job_mark_process_as_failed(const job_t *job, process_t *p)
{
/* The given process failed to even lift off (e.g. posix_spawn failed) and so doesn't have a valid pid. Mark it as dead. */
for (process_t *cursor = p; p != NULL; p = p->next)
for (process_t *cursor = p; cursor != NULL; cursor = cursor->next)
{
cursor->completed = 1;
}