diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-04-16 09:44:55 -0700 |
---|---|---|
committer | Chase Douglas <chase.douglas@ubuntu.com> | 2012-04-16 11:11:09 -0700 |
commit | 738c617b63dc1cc0700a6a7eac2912bd65c56c23 (patch) | |
tree | 6662e8565cac69060e35f4a67de610005be895ee | |
parent | cf0447f37db48b7c1297eb2b88d62328ef511141 (diff) |
Add ErrorSigSafe() alternative to ErrorF()
ErrorF() is not signal safe. Use ErrorSigSafe() whenever an error
message may be logged in signal context.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r-- | include/os.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h index 683679fc8..91d50c97d 100644 --- a/include/os.h +++ b/include/os.h @@ -709,4 +709,7 @@ _Pragma("GCC diagnostic pop") \ _LogMessageVerbSigSafe(type, verb, fmt, _args, _num_args); \ } while(0) +#define ErrorSigSafe(fmt, ...) \ + LogMessageVerbSigSafe(X_NONE, -1, fmt, __VA_ARGS__) + #endif /* OS_H */ |