[PATCH 01/19] init: avoid loop when opening tty
Florian Fainelli
florian at alphacore.org
Tue Sep 25 12:06:00 UTC 2012
From: Imre Kaloz <kaloz at openwrt.org>
Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
---
init/init.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/init/init.c b/init/init.c
index 7248946..4bae1c4 100644
--- a/init/init.c
+++ b/init/init.c
@@ -586,8 +586,11 @@ static void run_actions(int action_type)
/* Only run stuff with pid == 0. If pid != 0,
* it is already running
*/
- if (a->pid == 0)
+ if (a->pid == 0) {
+ if (a->terminal[0] && access(a->terminal, R_OK | W_OK))
+ continue;
a->pid = run(a);
+ }
}
}
}
--
1.7.9.5
More information about the busybox
mailing list