diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-08-13 08:32:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-13 09:19:37 +0200 |
commit | c09d0209104ffce677cc3402f9ac844ab20a6d5b (patch) | |
tree | 5cde0a98a1a2929527377f2ccb4270bf742914aa /sal/osl | |
parent | 6abfb78333faa11a7790eb18a79753992efc2737 (diff) |
Avoid non-async-signal-safe functionality after fork
Triggering those SAL_WARN sporadically caused deadlocks at least for
<https://ci.libreoffice.org/job/lo_ubsan/>.
Change-Id: I7b7037e411c29eea26e63f71a5679127b084f447
Reviewed-on: https://gerrit.libreoffice.org/77374
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/process.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 1e3c7d372d69..41d6de0b04ea 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -175,7 +175,9 @@ static void ChildStatusProc(void *pData) OSL_ASSERT(geteuid() == 0); /* must be root */ if (! INIT_GROUPS(data.m_name, data.m_gid) || (setuid(data.m_uid) != 0)) - SAL_WARN("sal.osl", "Failed to change uid and guid: " << UnixErrnoString(errno)); + { + // ignore; can't do much about it here after fork + } unsetenv("HOME"); } @@ -234,12 +236,12 @@ static void ChildStatusProc(void *pData) execv(data.m_pszArgs[0], const_cast<char **>(data.m_pszArgs)); } - SAL_WARN("sal.osl", "ChildStatusProc : Failed to exec <" << data.m_pszArgs[0] << ">: " << UnixErrnoString(errno)); - /* if we reach here, something went wrong */ errno_copy = errno; if ( !safeWrite(channel[1], &errno_copy, sizeof(errno_copy)) ) - SAL_WARN("sal.osl", "sendFdPipe : sending failed: " << UnixErrnoString(errno)); + { + // ignore; can't do much about it here after fork + } if ( channel[1] != -1 ) close(channel[1]); |