diff --git a/src/utils/Makefile b/src/utils/Makefile index d063607a..dfc8542b 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -47,7 +47,7 @@ trfileudi.o : fileudi.cpp fileudi.h EXECMD_OBJS= trexecmd.o $(BIGLIB) trexecmd : $(EXECMD_OBJS) - $(CXX) $(ALL_CXXFLAGS) -o trexecmd $(EXECMD_OBJS) $(LIBICONV) + $(CXX) $(ALL_CXXFLAGS) -o trexecmd $(EXECMD_OBJS) $(LIBICONV) $(LIBSYS) trexecmd.o : execmd.cpp execmd.h $(CXX) -o trexecmd.o -c $(ALL_CXXFLAGS) -DTEST_EXECMD execmd.cpp diff --git a/src/utils/conftree.cpp b/src/utils/conftree.cpp index 26d772a3..01e77ef4 100755 --- a/src/utils/conftree.cpp +++ b/src/utils/conftree.cpp @@ -552,7 +552,7 @@ int ConfTree::get(const std::string &name, string &value, const string &sk) #include #include #include - +#include #include #include #include diff --git a/src/utils/execmd.cpp b/src/utils/execmd.cpp index 9eb2b205..2bb1223e 100644 --- a/src/utils/execmd.cpp +++ b/src/utils/execmd.cpp @@ -214,7 +214,10 @@ int ExecCmd::startExec(const string &cmd, const list& args, // Set the process group for the child. This is also done in the // child process see wikipedia(Process_group) if (setpgid(m_pid, m_pid)) { - LOGERR(("ExecCmd: father failed setting pgid of son process\n")); + // This can fail with EACCES if the son has already done execve + // (linux at least) + LOGDEB(("ExecCmd: father setpgid(son)(%d,%d) errno %d (ok)\n", + m_pid, m_pid, errno)); } sigemptyset(&m_blkcld); @@ -556,6 +559,7 @@ void ExecCmd::dochild(const string &cmd, const list& args, //////////////////////////////////////////////////////////////////// #else // TEST #include +#include #include #include #include