Stop busy looping the child processes on trinity startup, so that they
do not compete with the main process for CPU time.
---
 main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 1401de7..fefc4bf 100644
--- a/main.c
+++ b/main.c
@@ -143,7 +143,8 @@ static void fork_children(void)
                        }
 
                        /* Wait for all the children to start up. */
-                       while (shm->ready == FALSE);
+                       while (shm->ready == FALSE)
+                               sleep(1);
 
                        init_child(pidslot);
 
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to