From 4f67c38777d6aa3abd5358068abafb0979ece920 Mon Sep 17 00:00:00 2001 From: axel Date: Mon, 22 Jan 2007 01:20:26 +1000 Subject: [PATCH] Use constant instead of hardcoded value for sleeptime on failed fork call darcs-hash:20070121152026-ac50b-1daaac921f31dd10b2646d51b65af5260890d291.gz --- exec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 65b426be5..bc53100d7 100644 --- a/exec.c +++ b/exec.c @@ -66,6 +66,11 @@ */ #define FORK_LAPS 5 +/** + The number of nanoseconds to sleep between attempts to call fork() +*/ +#define FORK_SLEEP_TIME 1000000 + /** Base open mode to pass to calls to open */ @@ -721,7 +726,7 @@ static pid_t exec_fork() } pollint.tv_sec = 0; - pollint.tv_nsec = 1000000; + pollint.tv_nsec = FORK_SLEEP_TIME; /* Don't sleep on the final lap - sleeping might change the