]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "common, global: use lttng ust functions for handling fork-like calls"
authorJason Dillaman <dillaman@redhat.com>
Wed, 30 Sep 2015 15:32:36 +0000 (11:32 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 13 Oct 2015 16:16:48 +0000 (12:16 -0400)
This reverts commit 811898912f3e43d7312efe5d06c496e1e7e22fa4.

src/common/Preforker.h
src/global/Makefile.am
src/global/global_init.cc

index ea64f6e764b6d4b9082c0abfc00492c8e412bf15..446f1c97f2babdf2225e979c4f2ea75022f775f1 100644 (file)
@@ -10,9 +10,6 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <unistd.h>
-#ifdef WITH_LTTNG
-#include <lttng/ust.h>
-#endif
 #include <sstream>
 #include <string>
 
@@ -33,9 +30,6 @@ class Preforker {
   pid_t childpid;
   bool forked;
   int fd[2];  // parent's, child's
-#ifdef WITH_LTTNG
-    sigset_t sigset;
-#endif
 
 public:
   Preforker()
@@ -53,10 +47,6 @@ public:
       return r;
     }
 
-#ifdef WITH_LTTNG
-    ust_before_fork(&sigset);
-#endif
-
     forked = true;
 
     childpid = fork();
@@ -67,9 +57,9 @@ public:
       return r;
     }
     if (childpid == 0) {
-      child_after_fork();
+      ::close(fd[0]);
     } else {
-      parent_after_fork();
+      ::close(fd[1]);
     }
     return 0;
   }
@@ -138,20 +128,6 @@ public:
     r += r2;  // make the compiler shut up about the unused return code from ::write(2).
   }
   
-private:
-  void child_after_fork() {
-#ifdef WITH_LTTNG
-    ust_after_fork_child(&sigset);
-#endif
-    ::close(fd[0]);
-  }
-
-  void parent_after_fork() {
-#ifdef WITH_LTTNG
-    ust_after_fork_parent(&sigset);
-#endif
-    ::close(fd[1]);
-  }
 };
 
 #endif
index 26960229d2ff990e824e01976bed6d747fe80bb9..79a7ffff689cd5f0a92d4e97b0e4908ee8b4cf1b 100644 (file)
@@ -4,9 +4,6 @@ libglobal_la_SOURCES = \
        global/pidfile.cc \
        global/signal_handler.cc
 libglobal_la_LIBADD = $(LIBCOMMON)
-if WITH_LTTNG
-libglobal_la_LIBADD += -llttng-ust -ldl
-endif
 noinst_LTLIBRARIES += libglobal.la
 
 noinst_HEADERS += \
index 4e6a6a6e9aa705d2f47b62d108fef6e3e46928f8..ed5d18633bedd8c848b73f7b7f30cbe5fea96210 100644 (file)
 
 #include <errno.h>
 #include <deque>
-#ifdef WITH_LTTNG
-#include <lttng/ust.h>
-#endif
-
 
 #define dout_subsys ceph_subsys_
 
@@ -288,11 +284,6 @@ void global_init_daemonize(CephContext *cct, int flags)
   if (global_init_prefork(cct, flags) < 0)
     return;
 
-#ifdef WITH_LTTNG
-  sigset_t sigset;
-  ust_before_fork(&sigset);
-#endif
-
   int ret = daemon(1, 1);
   if (ret) {
     ret = errno;
@@ -301,9 +292,6 @@ void global_init_daemonize(CephContext *cct, int flags)
     exit(1);
   }
 
-#ifdef WITH_LTTNG
-  ust_after_fork_child(&sigset);
-#endif
   global_init_postfork_start(cct);
   global_init_postfork_finish(cct, flags);
 }