mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
e3ed156eeb
properly (see tests/syslog_test.c for example). -Erik
20 lines
298 B
C
20 lines
298 B
C
#include <syslog.h>
|
|
|
|
int do_log(char* msg, int delay)
|
|
{
|
|
openlog("testlog", LOG_PID, LOG_DAEMON);
|
|
while(1) {
|
|
syslog(LOG_ERR, "%s: testing one, two, three\n", msg);
|
|
sleep(delay);
|
|
}
|
|
closelog();
|
|
return(0);
|
|
};
|
|
|
|
int main(void)
|
|
{
|
|
if (fork()==0)
|
|
do_log("A", 2);
|
|
do_log("B", 3);
|
|
}
|