pss-pstat.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1989-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
*
* process status stream PSS_METHOD_pstat implementation
*/
#include "psslib.h"
#if PSS_METHOD != PSS_METHOD_pstat
#else
#define _PSTAT64 1
#if _sys_param
#endif
#if _sys_pstat
#endif
typedef struct State_s
{
struct pst_status* pr;
struct pst_status* pp;
struct pst_status* pe;
int last;
} State_t;
static int
{
{
return -1;
}
return 1;
}
static int
{
int count;
if (pid)
{
return -1;
}
{
return -1;
if (!count)
return 0;
}
return 1;
}
static int
{
pe->tty = pr->pst_term.psd_major == -1 && pr->pst_term.psd_minor == -1 ? PSS_NODEV : makedev(pr->pst_term.psd_major, pr->pst_term.psd_minor);
{
}
return 1;
}
static int
{
char* s;
int i;
{
{
{
s[i] = 0;
s++;
}
}
if (fields & PSS_command)
{
{
s[i] = 0;
s++;
}
}
}
return 1;
}
static Pssmeth_t pstat_method =
{
"pstat",
"[-version?@(#)$Id: pss pstat (AT&T Research) 2003-02-01 $\n]"
"[-author?Glenn Fowler <gsf@research.att.com>]",
0,
0,
0,
0
};
#endif