summaryrefslogtreecommitdiff
path: root/startup
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-01 01:49:41 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-01 01:49:41 +0200
commitedb2947461fbea9b25a651afd1cf35dc49733ce6 (patch)
treed98e988d94847f08ba066112860897824a9ad486 /startup
parentb07024d194a5503fd87b32cab3c3a212b28738e1 (diff)
Fix looping over runsystem possibilities
* startup/startup.c (launch_something): Always increment TRY even on success, so that if runsystem unexpectedly returns, we get to try a shell instead.
Diffstat (limited to 'startup')
-rw-r--r--startup/startup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/startup/startup.c b/startup/startup.c
index 3c757e96..f54de5ec 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -1199,10 +1199,11 @@ launch_something (const char *why)
if (something != MACH_PORT_NULL)
{
mach_port_deallocate (mach_task_self (), something);
- if (start_child (tries[try], NULL) == 0)
+ if (start_child (tries[try++], NULL) == 0)
return;
}
- try++;
+ else
+ try++;
}
crash_system ();