aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-04-14 14:10:28 +0200
committerHenrik Nord <[email protected]>2011-04-14 14:10:59 +0200
commit8cc4299ceade79d9649fa3516b15d17f9dd41d32 (patch)
tree26b5b5bc75fab53717c29b0ca3b9b81880eb246e /erts/epmd
parent33ed693175e5da97f37e4a3a0eb08a60f22e2b6c (diff)
parentb363d7d34a0d5b61131a7edaec2180c6b5103544 (diff)
downloadotp-8cc4299ceade79d9649fa3516b15d17f9dd41d32.tar.gz
otp-8cc4299ceade79d9649fa3516b15d17f9dd41d32.tar.bz2
otp-8cc4299ceade79d9649fa3516b15d17f9dd41d32.zip
Merge branch 'hw/fix-epmd-perror' into dev
* hw/fix-epmd-perror: Fix epmd's dbg_perror() output OTP-9223
Diffstat (limited to 'erts/epmd')
-rw-r--r--erts/epmd/src/epmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
index c503c8c8cf..a1f202251c 100644
--- a/erts/epmd/src/epmd.c
+++ b/erts/epmd/src/epmd.c
@@ -497,8 +497,8 @@ static void dbg_gen_printf(int onsyslog,int perr,int from_level,
(int) strlen(timestr)-1, timestr);
len = strlen(buf);
erts_vsnprintf(buf + len, DEBUG_BUFFER_SIZE - len, format, args);
- if (perr == 1)
- perror(buf);
+ if (perr != 0)
+ fprintf(stderr,"%s: %s\r\n",buf,strerror(perr));
else
fprintf(stderr,"%s\r\n",buf);
}
@@ -509,7 +509,7 @@ void dbg_perror(EpmdVars *g,const char *format,...)
{
va_list args;
va_start(args, format);
- dbg_gen_printf(1,1,0,g,format,args);
+ dbg_gen_printf(1,errno,0,g,format,args);
va_end(args);
}