[PATCH 10/16] We no longer need to get the PID of init from loader.

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

 



---
 loader/loader.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index db5445b..9e3ab24 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -126,7 +126,6 @@ uint64_t flags = LOADER_FLAGS_SELINUX;
 int num_link_checks = 5;
 int post_link_sleep = 0;
 
-static pid_t init_pid = 1;
 static int init_sig = SIGUSR1; /* default to shutdown=halt */
 static const char *LANG_DEFAULT = "en_US.UTF-8";
 
@@ -1910,22 +1909,6 @@ int main(int argc, char ** argv) {
         isDevelMode = 1;
     }
 
-    /* get init PID if we have it */
-    if ((f = fopen("/var/run/init.pid", "r")) != NULL) {
-        char linebuf[256];
-
-        while (fgets(linebuf, sizeof(linebuf), f) != NULL) {
-            errno = 0;
-            init_pid = strtol(linebuf, NULL, 10);
-            if (errno == EINVAL || errno == ERANGE) {
-                logMessage(ERROR, "%s (%d): %m", __func__, __LINE__);
-                init_pid = 1;
-            }
-        }
-
-        fclose(f);
-    }
-
     signal(SIGUSR1, loaderUsrXHandler);
     signal(SIGUSR2, loaderUsrXHandler);
 
-- 
1.7.4.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux