diff options
author | Rick Reed <[email protected]> | 2012-05-22 12:28:09 -0700 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-03-09 10:47:58 +0100 |
commit | e2c11e89563f0c11794c91193b29bce00ca9c740 (patch) | |
tree | 66ecc060f1aa9e8fbacefcb22443f65f2abea7b1 /erts/epmd/src | |
parent | 38bd20f4f58e8025bd3ffc718cb7e40a4bde6396 (diff) | |
download | otp-e2c11e89563f0c11794c91193b29bce00ca9c740.tar.gz otp-e2c11e89563f0c11794c91193b29bce00ca9c740.tar.bz2 otp-e2c11e89563f0c11794c91193b29bce00ca9c740.zip |
Add missing error string to syslog logging in epmd
Diffstat (limited to 'erts/epmd/src')
-rw-r--r-- | erts/epmd/src/epmd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c index 5d5c3a1c3c..5dd4a2cc2e 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c @@ -486,7 +486,11 @@ static void dbg_gen_printf(int onsyslog,int perr,int from_level, #ifdef HAVE_SYSLOG_H if (onsyslog) { - erts_vsnprintf(buf, DEBUG_BUFFER_SIZE, format, args); + int len; + len = erts_vsnprintf(buf, DEBUG_BUFFER_SIZE, format, args); + if (perr != 0 && len < sizeof(buf)) { + erts_snprintf(buf+len, sizeof(buf)-len, ": %s", strerror(perr)); + } syslog(LOG_ERR,"epmd: %s",buf); } #endif |