aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-19 18:52:56 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-19 18:52:56 +0000
commit8cc5ded012fe44d226971e81f5674636a650c0ad (patch)
tree60af21090f97b033785093ed00a123006808cf88 /tests
parent523bc86c8566830be7907f327810e12a016aa70a (diff)
downloadbusybox-w32-8cc5ded012fe44d226971e81f5674636a650c0ad.tar.gz
busybox-w32-8cc5ded012fe44d226971e81f5674636a650c0ad.tar.bz2
busybox-w32-8cc5ded012fe44d226971e81f5674636a650c0ad.zip
Make the sys logger for so that concurrent logging will work
properly (see tests/syslog_test.c for example). -Erik git-svn-id: svn://busybox.net/trunk/busybox@489 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tests')
-rw-r--r--tests/.cvsignore1
-rw-r--r--tests/Makefile2
-rw-r--r--tests/syslog_test.c19
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/.cvsignore b/tests/.cvsignore
index 5f8452313..3645cf92f 100644
--- a/tests/.cvsignore
+++ b/tests/.cvsignore
@@ -13,3 +13,4 @@ mv
13mv_*.bb 13mv_*.bb
14mv_*.gnu 14mv_*.gnu
15mv_tests 15mv_tests
16syslog_test
diff --git a/tests/Makefile b/tests/Makefile
index c4fb0e911..508bc64f2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -29,3 +29,5 @@ BBL := $(shell pushd .. >/dev/null && \
29${BBL}: ../busybox 29${BBL}: ../busybox
30 rm -f $@ 30 rm -f $@
31 ln ../busybox $@ 31 ln ../busybox $@
32
33syslog_test: syslog_test.c
diff --git a/tests/syslog_test.c b/tests/syslog_test.c
new file mode 100644
index 000000000..fb4c691b1
--- /dev/null
+++ b/tests/syslog_test.c
@@ -0,0 +1,19 @@
1#include <syslog.h>
2
3int 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
14int main(void)
15{
16 if (fork()==0)
17 do_log("A", 2);
18 do_log("B", 3);
19}