sysvinit-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sysvinit-devel] init: add longer select interval for check_init_fifo()


From: 洪绪 郭
Subject: [sysvinit-devel] init: add longer select interval for check_init_fifo() function
Date: Sun, 17 Oct 2010 14:49:20 +0800 (CST)

Currently, init process polls pipe_fd every 5s. This hurts power on battery driven devices. Becasue this timer interrupt prevent the system from sleeping for longer time. This patch adds the polling interval to 60s. This patch does not cause any harm to check_init_fifo() , becasue init process can make response immediately when there is message in the pipe.
 

Signed-off-by: Xia Wu address@hidden

---
 init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/init.c b/init.c
index 7d3827c..0583218 100644
--- a/init.c
+++ b/init.c
@@ -2225,7 +2225,7 @@ void check_init_fifo(void)
  /* Do select, return on EINTR. */
  FD_ZERO(&fds);
  FD_SET(pipe_fd, &fds);
- tv.tv_sec = 5;
+ tv.tv_sec = 60;
  tv.tv_usec = 0;
  n = select(pipe_fd + 1, &fds, NULL, NULL, &tv);
  if (n <= 0) {
--
1.7.2.3

 
reply via email to

[Prev in Thread] Current Thread [Next in Thread]