Skip to content

Commit

Permalink
rtapi/syslog-async: import syslog-async-0.2.tar.gz
Browse files Browse the repository at this point in the history
from http://www.thekelleys.org.uk/syslog-async
this is to get around syslog() blocking and signal handling issues
  • Loading branch information
Michael Haberler committed Mar 7, 2014
1 parent 2c1ba19 commit 8932a99
Show file tree
Hide file tree
Showing 10 changed files with 1,735 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/rtapi/syslog-async/CHANGELOG
@@ -0,0 +1,9 @@
release 0.2

Dual-license under GPL-v2 and GPL-v3.


release 0.1

Initial release.

340 changes: 340 additions & 0 deletions src/rtapi/syslog-async/COPYING

Large diffs are not rendered by default.

674 changes: 674 additions & 0 deletions src/rtapi/syslog-async/COPYING-v3

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/rtapi/syslog-async/Makefile
@@ -0,0 +1,17 @@
all: test libs

test: syslog_test.o syslog_async.o
gcc syslog_async.o syslog_test.o -o syslog_test

syslog_test.o: syslog_test.c syslog_async.h
gcc -c syslog_test.c

syslog_async.o: syslog_async.c syslog_async.h
gcc -Fpic -O2 -c -Wall syslog_async.c

libs: syslog_async.o
gcc -shared -Wl,-soname,libsyslogasync.so.1 -o \
libsyslogasync.so.1.0 syslog_async.o -lc

clean:
rm -f *.o *~ *.so.* syslog_test
36 changes: 36 additions & 0 deletions src/rtapi/syslog-async/README
@@ -0,0 +1,36 @@
Syslog_async
------------

A non-blocking syslog() replacement.

It is not widely known that the standard Unix syslog() library routine
can block waiting for the syslog daemon, but it is generally true. On
some systems, using a datagram socket for /dev/log avoids endless
waits, but on Linux, even this does not work. Try typing

killall -STOP syslogd

into a root terminal on a non-critical box: Eventually, everything
will stop.

This library provides a version of syslog() which never blocks: the
code was originally written for dnsmasq, to fix a deadlock between
syslod and dnsmasq where syslogd uses dnsmasq for DNS, and dnsmasq
uses syslogd for logging. It should be generally useful for any
daemon where it's more important that the daemon continue to function
than that it continue to log.

The code has been tested on Linux 2.6, OpenBSD 4.0 and FreeBSD 6.0. It
has been run with syslogd and syslog-ng. Note that it is not,
currently, threadsafe.

The header file, syslog_async.h is extensively commented, and details
how to use the library. It is, as far as possible, API compatible with
the POSIX-standard syslog.

Simon Kelley (simon@thekelleys.org.uk)
Duxford,
Cambridge,
UK.

Sat Feb 24 2007
4 changes: 4 additions & 0 deletions src/rtapi/syslog-async/Submakefile
@@ -0,0 +1,4 @@
INCLUDES += rtapi/syslog-async

../include/%.h: ./rtapi/syslog-async/%.h
cp $^ $@

0 comments on commit 8932a99

Please sign in to comment.