From 47f402aac6a10f2b7f4db54e9ebdd2d47b296d4a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 28 Jul 2014 17:44:52 +0200 Subject: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-base.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/mds-base.c b/src/mds-base.c index f1eab34..9baa42e 100644 --- a/src/mds-base.c +++ b/src/mds-base.c @@ -38,17 +38,62 @@ #define try(INSTRUCTION) if ((r = INSTRUCTION)) goto fail +/** + * Number of elements in `argv` + */ int argc = 0; + +/** + * Command line arguments + */ char** argv = NULL; + +/** + * Whether the server has been respawn + * rather than this being the initial spawn. + * This will be at least as true as `is_reexec`. + */ int is_respawn = -1; + +/** + * Whether the server is continuing + * from a self-reexecution + */ int is_reexec = 0; + +/** + * Whether to fork the process when the + * server has been properly initialised + */ int on_init_fork = 0; + +/** + * Command the run (`NULL` for none) when + * the server has been properly initialised + */ char* on_init_sh = NULL; + +/** + * The thread that runs the master loop + */ pthread_t master_thread; + +/** + * Whether the server has been signaled to terminate + */ volatile sig_atomic_t terminating = 0; + +/** + * Whether the server has been signaled to re-exec + */ volatile sig_atomic_t reexecing = 0; + +/** + * The file descriptor of the socket + * that is connected to the server + */ int socket_fd = -1; -- cgit v1.2.3-70-g09d2