/*
- * $Source$
* $Header$
*/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*
-/* gdb_fserv.c
-/*
-/* GDB - Routines to implement forking servers.
-/*
-/* Author: Noah Mendelsohn
-/* Copyright: 1986 MIT Project Athena
-/* For copying and distribution information, please see
-/* the file <mit-copyright.h>.
-/*
-/************************************************************************/
+/************************************************************************
+ *
+ * gdb_fserv.c
+ *
+ * GDB - Routines to implement forking servers.
+ *
+ * Author: Noah Mendelsohn
+ * Copyright: 1986 MIT Project Athena
+ * For copying and distribution information, please see
+ * the file <mit-copyright.h>.
+ *
+ ************************************************************************/
#include <mit-copyright.h>
#include <stdio.h>
#include "gdb.h"
#include <sys/resource.h>
\f
-/************************************************************************/
-/*
-/* create_forking_server (create_forking_server)
-/*
-/* Called by an application to turn itself into a forking model
-/* server. Returns from this routine occur only in the forked
-/* children. The parent lives in this routine forever, waiting
-/* for incoming connection requests and doing the appropriate
-/* forking.
-/*
-/* Children are expected to do their own cleanup, but this routine
-/* does do the work of reaping the resulting zombie processes.
-/*
-/* ARGUMENTS:
-/* ----------
-/*
-/* service-id identifies the port to be used for
-/* listening. Same rules as for
-/* create_listening_connection.
-/*
-/* validate-rtn pointer to a function to be called to
-/* validate the incoming client. Should
-/* return TRUE if client is acceptable,
-/* else false. If this is NULL, all clients
-/* are accepted.
-/*
-/* GLOBAL VARIABLES
-/* ----------------
-/*
-/* Children created by this routine inherit the global variables
-/* gdb_sockaddr_of_client, which is of type sockaddr_in and
-/* gdb_socklen, which is the returned length of the sockaddr.
-/* These are the Berkeley identifiers of the clients as accepted.
-/* Use of this interface is non-portable to other than Berkeley
-/* systems.
-/*
-/* The client's request tuple may be found in gdb_client_tuple.
-/*
-/************************************************************************/
+/************************************************************************
+ *
+ * create_forking_server (create_forking_server)
+ *
+ * Called by an application to turn itself into a forking model
+ * server. Returns from this routine occur only in the forked
+ * children. The parent lives in this routine forever, waiting
+ * for incoming connection requests and doing the appropriate
+ * forking.
+ *
+ * Children are expected to do their own cleanup, but this routine
+ * does do the work of reaping the resulting zombie processes.
+ *
+ * ARGUMENTS:
+ * ----------
+ *
+ * service-id identifies the port to be used for
+ * listening. Same rules as for
+ * create_listening_connection.
+ *
+ * validate-rtn pointer to a function to be called to
+ * validate the incoming client. Should
+ * return TRUE if client is acceptable,
+ * else false. If this is NULL, all clients
+ * are accepted.
+ *
+ * GLOBAL VARIABLES
+ * ----------------
+ *
+ * Children created by this routine inherit the global variables
+ * gdb_sockaddr_of_client, which is of type sockaddr_in and
+ * gdb_socklen, which is the returned length of the sockaddr.
+ * These are the Berkeley identifiers of the clients as accepted.
+ * Use of this interface is non-portable to other than Berkeley
+ * systems.
+ *
+ * The client's request tuple may be found in gdb_client_tuple.
+ *
+ ************************************************************************/
CONNECTION
char *service;
int (*validate)();
{
-
+ void start_accepting_client();
CONNECTION incoming; /* listen for incoming */
/* children here */
CONNECTION client = NULL; /* connection to client */
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_in_cdlen(dp,hcon)
char *dp; /* pointer to the data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_in_enc(dp, hcon, outp)
char *dp; /* pointer to data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_in_dec(outp, hcon, inp)
char *inp; /* pointer to data */
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_rl_cdlen(dp,hcon)
char *dp; /* pointer to the data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_rl_enc(dp, hcon, outp)
char *dp; /* pointer to data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_rl_dec(outp, hcon, inp)
char *inp; /* pointer to data */
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_dt_cdlen(dp,hcon)
char *dp; /* pointer to the data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_dt_enc(dp, hcon, outp)
char *dp; /* pointer to data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_dt_dec(outp, hcon, inp)
char *inp; /* pointer to data */