Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2002 11:16:34 -0500
From:      Martin McCormick <martin@dc.cis.okstate.edu>
To:        freebsd-questions@freebsd.org
Subject:   Time related Signal to Use in a Daemon
Message-ID:  <200209121616.g8CGGYw75354@dc.cis.okstate.edu>

next in thread | raw e-mail | index | archive | help
	Is there a way, short of poling gettimeofday, to get
access to a signal that occurs periodically such as once per
second?

	I want to capture serial data to a log file and then 
have the daemon close that file and open another one after so
many seconds have passed.

	The data being logged are sent in a continuous stream so
my file switching program mustn't loose
any data while the switch is happening, but I figure a small
buffer will take care of that.

	I mainly want the program to be able to switch files and
also know if data have stopped coming in to the system after a
specific amount of time.

	Both functions need to know at least of the passing of
seconds.

	I read the man page on signals but was not sure if that
is an appropriate use of signals or, for that matter, whether
there is a time tick signal that one can catch which certainly
would allow one to do exactly these sorts of things.

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Center for Computing and Information Services Network Operations Group

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209121616.g8CGGYw75354>