File:  [CSRG BSD Unix] / 43BSDTahoe / new / nntp / server / profile.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

#include <sys/types.h>
#include <sys/stat.h>

#define	MON	"gmon.out"
#define	DIR	"/usr/tmp/nntpd.prof"

profile()
{
	static char	tmp[] = "gmon.XXXXXX";
	struct stat	statbuf;

	if (chdir(DIR) < 0)
		return;

	if (stat(MON, statbuf) < 0)
		return;

	(void) mktemp(tmp);

	(void) rename(MON, tmp);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.