Move some #include's around to fix build issue.
authorDavin McCall <davmac@davmac.org>
Fri, 19 Jan 2018 20:15:05 +0000 (20:15 +0000)
committerDavin McCall <davmac@davmac.org>
Fri, 19 Jan 2018 20:15:05 +0000 (20:15 +0000)
src/baseproc-service.cc
src/service.cc

index ca16b1bcddfa675e45dfdbe8983d0a6268ca792f..e66e1a57e2f3bca214b45c87b00de3b084cafb28 100644 (file)
@@ -2,6 +2,9 @@
 
 #include <sys/un.h>
 #include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "dinit.h"
 #include "dinit-log.h"
index 710d9e5672f7ecc864e0c606bf7afc27819be650..4047c6eee1fd76403b47c8471e7f49024b03e3ea 100644 (file)
@@ -4,11 +4,8 @@
 #include <memory>
 #include <cstddef>
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
-#include <unistd.h>
 #include <termios.h>
 
 #include "dinit.h"
@@ -571,7 +568,9 @@ void service_record::release_console() noexcept
 
 bool service_record::interrupt_start() noexcept
 {
-    services->unqueue_console(this);
+    if (onstart_flags.starts_on_console) {
+        services->unqueue_console(this);
+    }
     return true;
 }