/***********************************************************************
* *
* 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 <css.h>
#include <ctype.h>
#include <error.h>
#include <tm.h>
typedef struct
{
char* args;
} Connection_t;
static int
{
char* s;
char** ap;
return -1;
{
while (s = *ap++)
{
}
}
}
static int
{
int n;
{
case CS_POLL_CLOSE:
{
}
return 0;
case CS_POLL_READ:
return -1;
dat[--n] = 0;
{
case 'd':
break;
case 'Q':
exit(0);
/*FALLTHROUGH*/
case 'q':
return -1;
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 args=`%s'\n", fmttime(*dat ? dat : "%K", time(NiL)), csname(css->state, 0), TST_VERSION, CS_HOST_LOCAL, csntoa(css->state, con->id.hid), getpid(), con->id.pid, con->id.uid, con->id.gid, con->args);
return -1;
return 1;
}
return 0;
}
static int
{
switch (op)
{
case CSS_INTERRUPT:
return 0;
case CSS_DORMANT:
exit(0);
case CSS_WAKEUP:
return 0;
}
return -1;
}
int
{
exit(1);
exit(1);
}