From edb2947461fbea9b25a651afd1cf35dc49733ce6 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 1 Sep 2016 01:49:41 +0200 Subject: 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. --- startup/startup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'startup/startup.c') 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 (); -- cgit v1.2.3