Commit graph

78 commits

Author SHA1 Message Date
Henry Castro
d70280fff8 loolwsd: when no available child sessions, pre spawns more children 2015-12-18 16:51:08 -04:00
Henry Castro
c0fbf5ebf9 loolwsd: remove child root folder when it is a gracefull shut down 2015-11-25 23:17:08 -04:00
Henry Castro
964d95f04b loolwsd: handle a graceful shutdown 2015-11-25 22:49:34 -04:00
Henry Castro
0417b90eeb loolwsd: add signal handler 2015-11-25 22:37:08 -04:00
Henry Castro
e2e0e3a962 loolwsd: call poll, to check the status of the websocket 2015-11-25 22:23:08 -04:00
Mihai Varga
676c6d60d1 tdf#94607 downloadAs command that generates an URL for the doc
When requested, the document is exported under
/jail_path/CHILD_ID/user/thedocument/RANDOMDIR/filename
and CHILD_ID, RANDOMDIR and the filename are communicated to the client.

When the client requests
http://server:port/CHILD_ID/RANDOMDIR/filename, the exported document
is served and then RANDOMDIR is removed
2015-10-09 16:11:38 +03:00
Henry Castro
ee928f9af1 loolwsd: create lokit process id logs
Also, when used with --test option, create lokit PID log
so it is attached to the debugger.

gdb loolwsd $(cat /tmp/lokit.pid)
2015-08-05 20:20:05 -04:00
Henry Castro
1c0153d5e0 loolwsd: ensure one child when debugging
when used with --test option:
./loolwsd --test --systemplate=${SYSTEMPLATE} --lotemplate=${MASTER}/instdir
--childroot=${ROOTFORJAILS}

ensure that one child is created and attach to it easily to debug lokit
messages
2015-08-05 20:05:30 -04:00
Henry Castro
0ec12fe11e loolwsd: fix child fork when debugging one child 2015-08-05 18:19:51 -04:00
Henry Castro
ec094f1601 loolwsd: remove _pendingPreSpawnedChildren.
_pendingPreSpawnedChildren is no longer need it, because
fork() is used.
Also adjusted time sleep to 1 second.
2015-07-24 15:17:46 -04:00
Henry Castro
6dafcc753f loolwsd: process sleep for amount of time ...
specified by MAINTENANCE_INTERVAL
2015-07-24 14:10:24 -04:00
Henry Castro
de3d97d5a4 loolwsd: create PID log file.
The PID log file is used by external utilities
to report processes, threads, etc.
2015-07-19 16:49:11 -04:00
Henry Castro
66756a77a9 loolwsd: change named mutex to private static. 2015-07-18 12:35:16 -04:00
Henry Castro
63a33b39f6 loolwsd: moved server socket to main function. 2015-07-17 17:55:57 -04:00
Henry Castro
99ca81a944 loolwsd: move server socket to parent process 2015-07-17 14:04:40 -04:00
Henry Castro
bb3611399b loolwsd: Use fork but no execve 2015-07-13 10:13:06 -04:00
Tor Lillqvist
ea2141ffe7 Take the tile cache directory as an option, too 2015-06-04 17:09:19 +03:00
Tor Lillqvist
180f8fcba0 Pass the --uid option to the child too 2015-05-22 17:42:36 +01:00
Tor Lillqvist
9af39d189a Add some fairly hackish things to make this run better on OS X 2015-05-22 14:34:21 +01:00
Tor Lillqvist
3e9c4d4bf3 Use a separate HTTPServer listening for child processes connnecting
Otherwise, if we use the same port number and same HTTPServer, if enough
clients try to contact us and, we won't be able to accept child processes
having been spawned.

Also add some temporary debugging output here and there to debug lifecycle
management issues.
2015-05-08 21:30:32 +03:00
Tor Lillqvist
2110aef06a No need for this member to be public 2015-04-28 11:02:29 +03:00
Tor Lillqvist
fcea475bb5 Use separate classes derived from LOOLSession for parent and child processes
Work in progress. Does not work properly yet.
2015-04-22 21:48:04 +03:00
Tor Lillqvist
b760359bda Terminology change: s/fork/spawn
We aren't doing any fork-but-not-exec trick anyway, just a straightforward
start of a child process.
2015-04-22 21:45:31 +03:00
Tor Lillqvist
0a60ea9dcc Bump Emacs fill-column to 100
The default 70 is so last century.
2015-04-22 21:43:11 +03:00
Tor Lillqvist
f9d93ea57c Work in progress: "pre-forking", chroot, etc. Non-working state
Lots of changes to the server code, LOOLWSD and LOOLSession mainly. This is an
intermediate commit.
2015-04-22 21:42:17 +03:00
Tor Lillqvist
df95739819 Make DEFAULT_PORT_NUMBER public 2015-03-26 17:04:08 +02:00
Tor Lillqvist
b7c08d373e WaE: private field '_helpRequested' is not used 2015-03-26 14:37:38 +02:00
Tor Lillqvist
e8ea0f0d2e Use separate child processes for LibreOfficeKit
For now, each LOOL client has a separate child process (or none at all, if it
has accessed only information found in the cache). This will obviously have to
chnage to handle collaboration. Etc.

The parent process talks the same Websocket protocol with the child
processes. When there is a child process for a client, traffic from the client
is forwarded as such to the child process and vice versa.
2015-03-18 15:38:01 +02:00