small linux include and makefile adjustments
This commit is contained in:
parent
d5c2dc8286
commit
8a6c6a0026
@ -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
|
||||
|
||||
|
||||
@ -552,7 +552,7 @@ int ConfTree::get(const std::string &name, string &value, const string &sk)
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
@ -214,7 +214,10 @@ int ExecCmd::startExec(const string &cmd, const list<string>& 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<string>& args,
|
||||
////////////////////////////////////////////////////////////////////
|
||||
#else // TEST
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user