]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: remove deadcode, warnings
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 4 Feb 2011 18:57:56 +0000 (10:57 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 4 Feb 2011 18:57:56 +0000 (10:57 -0800)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/msg/SimpleMessenger.cc

index 97e87c1167ae6a0b13dc5d537e135cd40681335b..2dd82afe47988b8a809cc34b6c7ab17197373fe4 100644 (file)
@@ -2407,22 +2407,9 @@ int SimpleMessenger::start(bool nodaemon)
              << dendl;
     }
 
-    if (1) {
-      daemon(1, 0);
-      install_standard_sighandlers();
-      write_pid_file(getpid());
-    } else {
-      pid_t pid = fork();
-      if (pid) {
-       // i am parent
-       write_pid_file(pid);
-       ::close(0);
-       ::close(1);
-       ::close(2);
-       _exit(0);
-      }
-      install_standard_sighandlers();
-    }
+    daemon(1, 0);
+    install_standard_sighandlers();
+    write_pid_file(getpid());
  
     if (g_conf.chdir && g_conf.chdir[0]) {
       ::mkdir(g_conf.chdir, 0700);