Sleeps a "kit" process after fork() for the specified number of
seconds to give you time to attach it in the debugger.
Also, if set, have the parent ("broker") process wait indefinitely the
fifo to become writable.
Also clarify the informative message for SLEEPFORDEBUGGER.
globalPreinit() does not run in a chroot as far as I see, so trying to
use loSubPath as an absolute path will not work. Probably what was
meant is loTemplate, then the libraries at least are found.
If neither libsofficeapp.so or libmerged.so exist where we look for
them, say so explicitly.
Log the error message from dlerror(), too.
Log the mesage about not forking in all cases when doing that, not
just if lok_preinit is not found.
Execing is not an alternative to fork(), spawning is.
A load document operation may fail, for example, when user enters
a wrong password or no password. In such cases ToPrisoner sends a
disconnect to child. Child do not need to take any steps in this
case, such as, decrementing the view counter, because nothing was
loaded.
Change-Id: Ib71f871aa1728c6355563362987800dece1679d3
Reviewed-on: https://gerrit.libreoffice.org/22203
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Otherwise we have a problem when cached information is different than
the actual one maintained by LOKitDocument, keeping the whole
server setup in an inconsistent state.
For example, when client reloads the browser session quickly
after setting the current part (to say 3) of an opened part document.
If the reload occurs soon enough before the 'setclientpart'
message originated from the client is acknowledged by the server,
then the next reload would get the cached 'status' entry asking
the client to set 'currentpart' to something else leading to the
generation of another 'setclientpart' message. This thing would
go on, and we would run into a loop, as I have for the last few
hours.
Change-Id: Ia6260dfb772f2e3f023572aa060fd7da92b196c8
Reviewed-on: https://gerrit.libreoffice.org/22272
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Lets enable them only after we add support for templates/layouts
in the UI.
Change-Id: I82bc855b4313e9dc9b925473b64e498002c42700
Reviewed-on: https://gerrit.libreoffice.org/22225
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
... as we can have multiple connections for same document.
Change-Id: Ic213299d6a4ba703f1e27cf252f3a10209f08148
Reviewed-on: https://gerrit.libreoffice.org/22204
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>