forked from machinekit/machinekit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rtapi/syslog-async: import syslog-async-0.2.tar.gz
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
Showing
10 changed files
with
1,735 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
release 0.2 | ||
|
||
Dual-license under GPL-v2 and GPL-v3. | ||
|
||
|
||
release 0.1 | ||
|
||
Initial release. | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INCLUDES += rtapi/syslog-async | ||
|
||
../include/%.h: ./rtapi/syslog-async/%.h | ||
cp $^ $@ |
Oops, something went wrong.