summaryrefslogtreecommitdiffstats
path: root/procd.h
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-09-28 21:01:20 +0200
committerJohn Crispin <blogic@openwrt.org>2013-09-28 21:47:43 +0200
commitb5e17105b163442a030559b7b2c2454b82b3fd4c (patch)
treecd7eb3d97307f17703a62360f65938172e360576 /procd.h
parentf51f9cc5738d340423e44e678829402b367cf866 (diff)
downloadunitd-b5e17105b163442a030559b7b2c2454b82b3fd4c.tar
unitd-b5e17105b163442a030559b7b2c2454b82b3fd4c.zip
syslog() is a blocking call on eglibc. as procd provides the actual syslog, weneed to make sure that we do not run into a deadlock.
Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>
Diffstat (limited to 'procd.h')
-rw-r--r--procd.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/procd.h b/procd.h
index f7a333e..34cc9a1 100644
--- a/procd.h
+++ b/procd.h
@@ -31,17 +31,13 @@
fprintf(stderr, "procd: %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \
} while (0)
-#define SYSLOG(p, fmt, ...) do { \
- syslog(p, fmt, ## __VA_ARGS__); \
- } while (0)
-
#define LOG(fmt, ...) do { \
- syslog(LOG_INFO, fmt, ## __VA_ARGS__); \
+ log_printf(fmt, ## __VA_ARGS__); \
fprintf(stderr, "procd: "fmt, ## __VA_ARGS__); \
} while (0)
#define ERROR(fmt, ...) do { \
- syslog(LOG_ERR, fmt, ## __VA_ARGS__); \
+ log_printf(fmt, ## __VA_ARGS__); \
fprintf(stderr, "procd: "fmt, ## __VA_ARGS__); \
} while (0)