aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common/erlexec.c
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-02-14 14:34:29 +0100
committerDan Gudmundsson <[email protected]>2013-05-20 13:35:02 +0200
commit39cb6a99b06cb80bbe8b2277e06e7ca868cc9a9a (patch)
tree47e13b9f0407cf20061202fc20bb32b460cbd286 /erts/etc/common/erlexec.c
parentd9cb8383625bd06e0f2d9548b392f199e7949e24 (diff)
downloadotp-39cb6a99b06cb80bbe8b2277e06e7ca868cc9a9a.tar.gz
otp-39cb6a99b06cb80bbe8b2277e06e7ca868cc9a9a.tar.bz2
otp-39cb6a99b06cb80bbe8b2277e06e7ca868cc9a9a.zip
erts: Fix windows widestring args and paths in tools
Fix erlc, escript, dialyzer, typer, ct_run, heart and epmd should all be using widestrings on windows
Diffstat (limited to 'erts/etc/common/erlexec.c')
-rw-r--r--erts/etc/common/erlexec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 4b416adc56..e4a8c4ff45 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -1175,11 +1175,14 @@ start_epmd(char *epmd)
strcat(epmd, arg1);
}
{
- STARTUPINFO start;
+ wchar_t wcepmd[MAXPATHLEN+100];
+ STARTUPINFOW start;
PROCESS_INFORMATION pi;
memset(&start, 0, sizeof (start));
start.cb = sizeof (start);
- if (!CreateProcess(NULL, epmd, NULL, NULL, FALSE,
+ MultiByteToWideChar(CP_UTF8, 0, epmd, -1, wcepmd, MAXPATHLEN+100);
+
+ if (!CreateProcessW(NULL, wcepmd, NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE | DETACHED_PROCESS,
NULL, NULL, &start, &pi))
result = -1;