From 809ee10f37bac29b3056f4fb09c072b951e29f0c Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 14 Nov 2013 18:18:12 +0100 Subject: ose: Fix starting with pm_create For some reason starting with pm_create offsets the input argument list by one, so we have to adjust them before calling erl_start. --- erts/emulator/sys/ose/erl_main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'erts/emulator/sys') diff --git a/erts/emulator/sys/ose/erl_main.c b/erts/emulator/sys/ose/erl_main.c index a17fc7eabc..03119c3fec 100644 --- a/erts/emulator/sys/ose/erl_main.c +++ b/erts/emulator/sys/ose/erl_main.c @@ -17,8 +17,16 @@ * %CopyrightEnd% */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include +#include "sys.h" +#include "erl_vm.h" +#include "global.h" +#include "ose.h" + int main(int argc, char **argv) { @@ -30,8 +38,8 @@ main(int argc, char **argv) { char **tmp_argv = malloc(sizeof(char*)*(argc+1)); for (i = 0; i < argc; i++) tmp_argv[i+1] = argv[i]; - tmp_argv = "beam"; - erl_start(argc,tmp_argv); + tmp_argv[0] = "beam"; + erl_start(argc+1,tmp_argv); free(tmp_argv); } else { erl_start(argc,argv); -- cgit v1.2.3