Revert "uitest: make child soffice process die when parent dies"
This reverts commitd35840a211
, now that43aef04d77
"Reliably wait for soffice to terminate" makes sure that no soffice-related processes are left behind by UITests. Using PR_SET_PDEATHSIG had the following drawbacks: * It defeats debugging if a runaway process is forcefully killed by the test framework. (And there are already higher-layer mechanisms in place for the reliable termination of runaway tinderbox builds, see the commit message of43aef04d77
mentioned above.) * It is brittle in that it can terminate soffice-related processes too early, as the signal is sent as soon as the parent's thread that spawned the child (and not the parent process as a whole) terminates. * It is Linux-only. Change-Id: Ia07f5dbaafc824bad0dfbdb1a2aabe6d5508741b Reviewed-on: https://gerrit.libreoffice.org/80186 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -42,11 +42,6 @@
|
|||||||
#include <osl/file.hxx>
|
#include <osl/file.hxx>
|
||||||
#include <sal/log.hxx>
|
#include <sal/log.hxx>
|
||||||
|
|
||||||
#ifdef LINUX
|
|
||||||
#include <sys/prctl.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace com::sun::star::lang;
|
using namespace com::sun::star::lang;
|
||||||
using namespace com::sun::star::uri;
|
using namespace com::sun::star::uri;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
@@ -367,15 +362,6 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
|
|||||||
{
|
{
|
||||||
// Do nothing, accept only for backward compatibility
|
// Do nothing, accept only for backward compatibility
|
||||||
}
|
}
|
||||||
else if ( oArg == "dont-survive-parent" )
|
|
||||||
{
|
|
||||||
// only supported on linux for now
|
|
||||||
#ifdef LINUX
|
|
||||||
prctl(PR_SET_PDEATHSIG, SIGKILL);
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "Warning: dont-survive-parent is not supported on this platform (yet).\n");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if ( oArg == "nologo" )
|
else if ( oArg == "nologo" )
|
||||||
{
|
{
|
||||||
m_nologo = true;
|
m_nologo = true;
|
||||||
|
@@ -112,8 +112,7 @@ namespace desktop
|
|||||||
"Developer arguments: \n"
|
"Developer arguments: \n"
|
||||||
" --terminate_after_init \n"
|
" --terminate_after_init \n"
|
||||||
" Exit after initialization complete (no documents loaded)\n"
|
" Exit after initialization complete (no documents loaded)\n"
|
||||||
" --eventtesting Exit after loading documents. \n"
|
" --eventtesting Exit after loading documents. \n\n"
|
||||||
" --dont-survive-parent Exit when the parent exits (linux only) \n\n"
|
|
||||||
"New document creation arguments: \n"
|
"New document creation arguments: \n"
|
||||||
"The arguments create an empty document of specified kind. Only one of them may \n"
|
"The arguments create an empty document of specified kind. Only one of them may \n"
|
||||||
"be used in one command line. If filenames are specified after an argument, \n"
|
"be used in one command line. If filenames are specified after an argument, \n"
|
||||||
|
@@ -9,10 +9,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <osl/process.h>
|
#include <osl/process.h>
|
||||||
#ifdef LINUX
|
|
||||||
#include <sys/prctl.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "args.h"
|
#include "args.h"
|
||||||
|
|
||||||
@@ -125,15 +121,6 @@ Args *args_parse (void)
|
|||||||
args->pPageinType = pArgDescr[j].pPageinType;
|
args->pPageinType = pArgDescr[j].pPageinType;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rtl_ustr_ascii_compare_WithLength(
|
|
||||||
arg, length, "dont-survive-parent")
|
|
||||||
== 0)
|
|
||||||
{
|
|
||||||
#ifdef LINUX
|
|
||||||
prctl(PR_SET_PDEATHSIG, SIGKILL);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ class OfficeConnection:
|
|||||||
argv = [soffice, "--accept=" + socket + ";urp",
|
argv = [soffice, "--accept=" + socket + ";urp",
|
||||||
"-env:UserInstallation=" + userdir,
|
"-env:UserInstallation=" + userdir,
|
||||||
"--quickstart=no", "--nofirststartwizard",
|
"--quickstart=no", "--nofirststartwizard",
|
||||||
"--norestore", "--nologo", "--dont-survive-parent"]
|
"--norestore", "--nologo"]
|
||||||
if "--valgrind" in self.args:
|
if "--valgrind" in self.args:
|
||||||
argv.append("--valgrind")
|
argv.append("--valgrind")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user