h46860
s 00007/00001/00037
d D 1.2 83/06/02 09:26:51 ross 2 1
c turn monitoring off.
e
s 00038/00000/00000
d D 1.1 82/08/02 16:01:53 cecily 1 0
e
u
U
t
T
I 1
#include	"mon.h"

int	monitor	=	0;
int	monuid[ ]	=	{
D 2
	168, 263, 0
E 2
I 2
	0,
E 2
	};
char	monf[64];

/*
 *   Problem monitor
 */
smon(uid)
register int uid;
{
	register int *p;

I 2
#ifndef	MON
	return;
#endif
E 2
	if (monitor)
		return;

	p = monuid;
	while (*p)
		if (*p++ == uid)  {
			sprintf(monf, "/usr/sha/%d", uid);
			monitor = open(monf, 1);
			if (monitor < 0)
				monitor = creat(monf, 0600);
			return;
			}
}

mon(c)
int c;
{
	static char cc;

I 2
#ifndef	MON
	return;
#endif
E 2
	cc = c;
	write(monitor, &cc, 1);
}
E 1
