* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)log.c 5.1 (Berkeley) %G%";
static FILE *flog
= NULL
;
* Log file maintenance routines
logent(group
, num
, acu
, message
)
char *group
, *num
, *acu
, *message
;
if (flock(fileno(flog
), LOCK_EX
) < 0) {
if ((user
= getlogin()) == NOSTR
)
if ((pwd
= getpwuid(getuid())) == NOPWD
)
fprintf(flog
, "%s (%s) <%s, %s, %s> %s\n",
(void) flock(fileno(flog
), LOCK_UN
);
flog
= fopen(value(LOG
), "a");
fprintf(stderr
, "can't open log file\r\n");