|
a/src/common/rclinit.cpp |
|
b/src/common/rclinit.cpp |
|
... |
|
... |
48 |
// We would like to block SIGCHLD globally, but we can't because
|
48 |
// We would like to block SIGCHLD globally, but we can't because
|
49 |
// QT uses it. Have to block it inside execmd.cpp
|
49 |
// QT uses it. Have to block it inside execmd.cpp
|
50 |
|
50 |
|
51 |
// Install signal handler
|
51 |
// Install signal handler
|
52 |
if (sigcleanup) {
|
52 |
if (sigcleanup) {
|
|
|
53 |
struct sigaction action;
|
|
|
54 |
action.sa_handler = sigcleanup;
|
|
|
55 |
action.sa_flags = 0;
|
|
|
56 |
sigemptyset(&action.sa_mask);
|
53 |
for (unsigned int i = 0; i < sizeof(catchedSigs) / sizeof(int); i++)
|
57 |
for (unsigned int i = 0; i < sizeof(catchedSigs) / sizeof(int); i++)
|
54 |
if (signal(catchedSigs[i], SIG_IGN) != SIG_IGN)
|
58 |
if (signal(catchedSigs[i], SIG_IGN) != SIG_IGN) {
|
55 |
signal(catchedSigs[i], sigcleanup);
|
59 |
if (sigaction(catchedSigs[i], &action, 0) < 0) {
|
|
|
60 |
perror("Sigaction failed");
|
|
|
61 |
}
|
|
|
62 |
}
|
56 |
}
|
63 |
}
|
57 |
|
64 |
|
58 |
DebugLog::getdbl()->setloglevel(DEBDEB1);
|
65 |
DebugLog::getdbl()->setloglevel(DEBDEB1);
|
59 |
DebugLog::setfilename("stderr");
|
66 |
DebugLog::setfilename("stderr");
|
60 |
RclConfig *config = new RclConfig(argcnf);
|
67 |
RclConfig *config = new RclConfig(argcnf);
|