aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd_cli.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2013-01-22 18:35:35 +0100
committerRickard Green <[email protected]>2013-01-22 18:35:35 +0100
commit3aa60cc472bc330dbe9360eb27a1f340b7e23dc6 (patch)
tree5ca569797dfe588914c83abc599e03d120cce9cc /erts/epmd/src/epmd_cli.c
parent5ee4c7136ce8f311e3d3384ae0feb29bcbff6e85 (diff)
downloadotp-3aa60cc472bc330dbe9360eb27a1f340b7e23dc6.tar.gz
otp-3aa60cc472bc330dbe9360eb27a1f340b7e23dc6.tar.bz2
otp-3aa60cc472bc330dbe9360eb27a1f340b7e23dc6.zip
Add UTF-8 node name support for epmd
Diffstat (limited to 'erts/epmd/src/epmd_cli.c')
-rw-r--r--erts/epmd/src/epmd_cli.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c
index 74408e3ebe..1d4de64b63 100644
--- a/erts/epmd/src/epmd_cli.c
+++ b/erts/epmd/src/epmd_cli.c
@@ -22,6 +22,7 @@
#endif
#include "epmd.h" /* Renamed from 'epmd_r4.h' */
#include "epmd_int.h"
+#include "erl_printf.h" /* erts_snprintf */
/* forward declarations */
@@ -114,16 +115,18 @@ void epmd_call(EpmdVars *g,int what)
epmd_cleanup_exit(g,1);
}
j = ntohl(i);
- if (!g->silent)
- printf("epmd: up and running on port %d with data:\n", j);
+ if (!g->silent) {
+ rval = erts_snprintf(buf, OUTBUF_SIZE,
+ "epmd: up and running on port %d with data:\n", j);
+ write(1, buf, rval);
+ }
while(1) {
- if ((rval = read(fd,buf,1)) <= 0) {
+ if ((rval = read(fd,buf,OUTBUF_SIZE)) <= 0) {
close(fd);
epmd_cleanup_exit(g,0);
}
- buf[rval] = '\0';
if (!g->silent)
- printf("%s",buf);
+ write(1, buf, rval); /* Potentially UTF-8 encoded */
}
}