]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: write pid file and daemonize last
authorcee1 <fykcee1@gmail.com>
Thu, 21 Apr 2011 19:21:19 +0000 (15:21 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 21 Apr 2011 19:21:19 +0000 (15:21 -0400)
These actions serve to notify plymouthd's readiness.
We should make sure they are run after plymouthd is actually
done starting up.

src/main.c

index 87101c0a394f995e9758139ace54d95b4bcad9a8..84f4e5dcf91da8b7bf042e0b34b868627f5fe7b3 100644 (file)
@@ -2222,6 +2222,11 @@ main (int    argc,
       return EX_UNAVAILABLE;
     }
 
+  state.progress = ply_progress_new ();
+
+  ply_progress_load_cache (state.progress,
+                           get_cache_file_for_mode (state.mode));
+
   if (pid_file != NULL)
     write_pid_file (pid_file);
 
@@ -2232,11 +2237,6 @@ main (int    argc,
       return EX_UNAVAILABLE;
     }
 
-  state.progress = ply_progress_new ();
-
-  ply_progress_load_cache (state.progress,
-                           get_cache_file_for_mode (state.mode));
-
   ply_trace ("entering event loop");
   exit_code = ply_event_loop_run (state.loop);
   ply_trace ("exited event loop");