diff --git a/src/invoker/search.c b/src/invoker/search.c index 998b536..d3e2277 100644 --- a/src/invoker/search.c +++ b/src/invoker/search.c @@ -24,6 +24,7 @@ #include #include +#include "report.h" #include "search.h" static char* merge_paths(const char *base_path, const char *rel_path) diff --git a/src/launcherlib/connection.cpp b/src/launcherlib/connection.cpp index a8deadf..676b4f6 100644 --- a/src/launcherlib/connection.cpp +++ b/src/launcherlib/connection.cpp @@ -179,25 +179,6 @@ bool Connection::recvMsg(uint32_t *msg) } } -bool Connection::sendStr(const char * str) -{ - if (!m_testMode) - { - // Send size. - uint32_t size = strlen(str) + 1; - sendMsg(size); - - Logger::logDebug("Connection: %s: '%s'", __FUNCTION__, str); - - // Send the string. - return write(m_fd, str, size) != -1; - } - else - { - return true; - } -} - const char * Connection::recvStr() { if (!m_testMode) diff --git a/src/launcherlib/connection.h b/src/launcherlib/connection.h index 57fbef4..63e59da 100644 --- a/src/launcherlib/connection.h +++ b/src/launcherlib/connection.h @@ -143,9 +143,6 @@ private: //! Receive a message from a socket. This is a virtual to help unit testing. virtual bool recvMsg(uint32_t *msg); - //! Send a string. This is a virtual to help unit testing. - virtual bool sendStr(const char * str); - //! Receive a string. This is a virtual to help unit testing. virtual const char * recvStr(); diff --git a/src/launcherlib/daemon.cpp b/src/launcherlib/daemon.cpp index c7b8bea..172f3a4 100644 --- a/src/launcherlib/daemon.cpp +++ b/src/launcherlib/daemon.cpp @@ -602,6 +602,7 @@ void Daemon::daemonize() } // Check the lock + // Note: file locking must be done after forking, otherwise lock belongs to parent process if(!Daemon::lock()) throw std::runtime_error(std::string(PROG_NAME_LAUNCHER) + " is already running\n");