
#include "V.h"
/*
* Here is a routine to close our logfile and reopen it.  This can be  used  by
* /etc/cleanup  to  clean  out  old  logfiles periodically.  This is called by
* various signal-handler routines and by Vchklog.  We suggest using the CONT
* signal as the way to tell a daemon to reopen its logfile, and do other sorts
* of around-midnight  housekeeping.   But  there  are  many  "conventions"  in
* existing  Unix  software  to  be  able  to agree on a standard signal.  Thus
* various existing programs do this in response to HUP, INT, and CONT signals,
* and possibly others.
*/
/*ARGSUSED*/
Vnewlog()
{	int r = -1;
	Fenter("newlog");
	if (Vfile && *Vfile) {
		P1 "%s\tRename logfile \"%s\" ...",Vtime(),Vfile D;
		Backup(Vfile);
	}
	P1 "%s\tReopen logfile \"%s\" ...",Vtime(),Vfile D;
	Vopt(0L);
	Fexit;
	return r;
}
