diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-06-05 15:39:41 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-07-02 22:34:32 -0700 |
commit | ac20815d5235e7a8e7b331365aabf5a489fc5e34 (patch) | |
tree | 6f7c34f02fde566c788649dce876965a72e3b2d1 /os/log.c | |
parent | 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 (diff) |
Add ErrorFSigSafe() alternative to ErrorF()
ErrorF() is not signal safe. Use ErrorSigSafe() whenever an error
message may be logged in signal context.
[whot: edited to "ErrorFSigSafe"]
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os/log.c')
-rw-r--r-- | os/log.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -780,6 +780,22 @@ ErrorF(const char *f, ...) } void +VErrorFSigSafe(const char *f, va_list args) +{ + LogVMessageVerbSigSafe(X_ERROR, -1, f, args); +} + +void +ErrorFSigSafe(const char *f, ...) +{ + va_list args; + + va_start(args, f); + VErrorFSigSafe(f, args); + va_end(args); +} + +void LogPrintMarkers(void) { /* Show what the message marker symbols mean. */ |