From 39cb6a99b06cb80bbe8b2277e06e7ca868cc9a9a Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 14 Feb 2013 14:34:29 +0100 Subject: 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 --- erts/etc/common/erlexec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'erts/etc/common/erlexec.c') 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; -- cgit v1.2.3