Server Wait On Clients System - API Documentation  v1.6.4
Server Wait On Clients System.
main.c File Reference

Server Wait On Clients server daemon. More...

#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <syslog.h>
#include <unistd.h>
#include <configmake.h>
#include "internal.h"
#include <libmgec/libmgec.h>
#include <libmgec/mge-bstree.h>
#include <libmgec/mge-errno.h>
#include <swoc/cmdlineargs.h>
#include <swoc/signalhandle.h>
Include dependency graph for main.c:

Macros

#define _Bool   signed char
 
#define bool   _Bool
 
#define false   0
 
#define true   1
 
#define __bool_true_false_are_defined   1
 

Functions

static void daemonise (void)
 
static int csscmp (const struct comm_spec *first, const struct comm_spec *last)
 
int main (int argc, char **argv)
 Program entry point. More...
 

Variables

int swsd_err
 swoc daemon error number. More...
 
char client [_POSIX_HOST_NAME_MAX]
 Client name. More...
 
int debug
 Debug - 0 false, 1 true. More...
 
int end
 End pending. More...
 
int cursockfd
 Socket file descriptor in use. More...
 
struct comm_spec * port_spec
 Port / socket config mappings. More...
 
bool srv_blocked
 Server is blocked? More...
 
struct bstree * cli_locks
 Clients and locks. More...
 
struct bstree * cli_blocked
 Blocked client list. More...
 
struct bstree * port_sock
 Port / socket actual mappings. More...
 

Detailed Description

Server Wait On Clients server daemon.

Daemon to enable a server to manage client locks and wait on the removal of those locks prior to further server processing.

Author
Copyright (C) 2016-2022 Mark Grant

Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only

Version
v1.0.22 ==== 17/09/2022

Macro Definition Documentation

◆ __bool_true_false_are_defined

#define __bool_true_false_are_defined   1

◆ _Bool

#define _Bool   signed char

◆ bool

#define bool   _Bool

◆ false

#define false   0

◆ true

#define true   1

Function Documentation

◆ csscmp()

static int csscmp ( const struct comm_spec *  first,
const struct comm_spec *  last 
)
static

◆ daemonise()

static void daemonise ( void  )
static

◆ main()

int main ( int  argc,
char **  argv 
)

Program entry point.

Parameters
argcStandard CLA argc.
argvStandard CLA argv.
Returns
EXIT_SUCCESS on success, EXIT_FAILURE on error.

Variable Documentation

◆ cli_blocked

struct bstree* cli_blocked

Blocked client list.

◆ cli_locks

struct bstree* cli_locks

Clients and locks.

◆ client

char client[_POSIX_HOST_NAME_MAX]

Client name.

◆ cursockfd

int cursockfd

Socket file descriptor in use.

◆ debug

int debug

Debug - 0 false, 1 true.

◆ end

int end

End pending.

◆ port_sock

struct bstree* port_sock

Port / socket actual mappings.

◆ port_spec

struct comm_spec* port_spec

Port / socket config mappings.

◆ srv_blocked

bool srv_blocked

Server is blocked?

◆ swsd_err

int swsd_err

swoc daemon error number.