projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Rewrite by Manuel Novoa III, very compact implimentation.
[oweals/busybox.git]
/
tests
/
syslog_test.c
1
#include <syslog.h>
2
3
int do_log(char* msg, int delay)
4
{
5
openlog("testlog", LOG_PID, LOG_DAEMON);
6
while(1) {
7
syslog(LOG_ERR, "%s: testing one, two, three\n", msg);
8
sleep(delay);
9
}
10
closelog();
11
return(0);
12
};
13
14
int main(void)
15
{
16
if (fork()==0)
17
do_log("A", 2);
18
do_log("B", 3);
19
}