|
a/src/utils/execmd.cpp |
|
b/src/utils/execmd.cpp |
|
... |
|
... |
640 |
}
|
640 |
}
|
641 |
fprintf(fp, "\n");
|
641 |
fprintf(fp, "\n");
|
642 |
}
|
642 |
}
|
643 |
#endif
|
643 |
#endif
|
644 |
|
644 |
|
|
|
645 |
// Execute the atexit funcs
|
|
|
646 |
while (!m_atexitfuncs.empty()) {
|
|
|
647 |
(m_atexitfuncs.top())();
|
|
|
648 |
m_atexitfuncs.pop();
|
|
|
649 |
}
|
|
|
650 |
|
645 |
// Try to get back to the initial working directory
|
651 |
// Try to get back to the initial working directory
|
646 |
if (m_cfd < 0 || fchdir(m_cfd) < 0) {
|
652 |
if (m_cfd < 0 || fchdir(m_cfd) < 0) {
|
647 |
LOGINFO(("ReExec::reexec: fchdir failed, trying chdir\n"));
|
653 |
LOGINFO(("ReExec::reexec: fchdir failed, trying chdir\n"));
|
648 |
if (!m_curdir.empty() && chdir(m_curdir.c_str())) {
|
654 |
if (!m_curdir.empty() && chdir(m_curdir.c_str())) {
|
649 |
LOGERR(("ReExec::reexec: chdir failed\n"));
|
655 |
LOGERR(("ReExec::reexec: chdir failed\n"));
|