/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1990-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* cs service test
*/
#include <cs.h>
#include <ctype.h>
#include <error.h>
#include <tm.h>
typedef struct
{
int clone;
char* args;
} Connection_t;
typedef struct
{
int active;
int dormant;
} State_t;
static void*
{
return (void*)state;
}
static int
{
char* s;
char** ap;
{
while (s = *ap++)
{
}
}
return 0;
}
static int
{
int n;
dat[--n] = 0;
{
case 'd':
break;
case 'Q':
/*FALLTHROUGH*/
case 'q':
goto drop;
default:
break;
}
else
n = sfsprintf(buf, sizeof(buf), "I [%s] server=%s version=%s %s=%s server.pid=%d pid=%d uid=%d gid=%d clone=%d args=`%s'\n", fmttime(*dat ? dat : "%K", time(NiL)), csname(0), TST_VERSION, CS_HOST_LOCAL, csntoa(state->id[fd].id.hid), getpid(), state->id[fd].id.pid, state->id[fd].id.uid, state->id[fd].id.gid, state->id[fd].clone, state->id[fd].args);
return 0;
drop:
return -1;
}
static int
{
{
exit(0);
}
return 0;
}
int
{
exit(1);
}