]> err.no Git - systemd/commitdiff
execute: use a much lower idle timeout that default time
authorLennart Poettering <lennart@poettering.net>
Tue, 22 May 2012 17:26:13 +0000 (19:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 May 2012 17:26:15 +0000 (19:26 +0200)
The idle timeout after all is for cosmetics only, hence avoid any
substantial delays just for it.

src/core/execute.c

index 4d4091940f9e13018940d2beaf1bcb59116563f6..4aed4f68497d3fa1dd277d43e51b88542b684f6f 100644 (file)
@@ -61,6 +61,8 @@
 #include "loopback-setup.h"
 #include "path-util.h"
 
+#define IDLE_TIMEOUT_USEC (1*USEC_PER_SEC)
+
 /* This assumes there is a 'tty' group */
 #define TTY_MODE 0620
 
@@ -1065,7 +1067,7 @@ int exec_spawn(ExecCommand *command,
                         if (idle_pipe[1] >= 0)
                                 close_nointr_nofail(idle_pipe[1]);
                         if (idle_pipe[0] >= 0) {
-                                fd_wait_for_event(idle_pipe[0], POLLHUP, DEFAULT_TIMEOUT_USEC);
+                                fd_wait_for_event(idle_pipe[0], POLLHUP, IDLE_TIMEOUT_USEC);
                                 close_nointr_nofail(idle_pipe[0]);
                         }
                 }