aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/ose/erl_main.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-10-15 18:10:47 +0200
committerLukas Larsson <[email protected]>2014-02-24 15:15:57 +0100
commit8ed59e4a9dddf083d2046e1bd58f397221928c0e (patch)
tree46c65c4edd5fdcb813ab3ca468c9cbc2eb53ad1d /erts/emulator/sys/ose/erl_main.c
parentf8cfcf356cf2f8c573713fc89883bb99003f242c (diff)
downloadotp-8ed59e4a9dddf083d2046e1bd58f397221928c0e.tar.gz
otp-8ed59e4a9dddf083d2046e1bd58f397221928c0e.tar.bz2
otp-8ed59e4a9dddf083d2046e1bd58f397221928c0e.zip
ose: Change start way to use arguments to beam.smp directly
The old way registered a shell command that needed to be executed. This way is more flexible as you can also use the lmconf file to set arguments there.
Diffstat (limited to 'erts/emulator/sys/ose/erl_main.c')
-rw-r--r--erts/emulator/sys/ose/erl_main.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/erts/emulator/sys/ose/erl_main.c b/erts/emulator/sys/ose/erl_main.c
index 21cfce9463..322058c87b 100644
--- a/erts/emulator/sys/ose/erl_main.c
+++ b/erts/emulator/sys/ose/erl_main.c
@@ -16,53 +16,11 @@
*
* %CopyrightEnd%
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include "sys.h"
-#include "erl_vm.h"
-#include "global.h"
-
-#include "shell.h"
-#include "ramlog.h"
-#include "ose_err/ose_err.h"
-
-static PROCESS mainPid;
-
-#ifdef DEBUG
-static OSADDRESS err_handler(OSBOOLEAN user_called, OSERRCODE ecode, OSERRCODE extra) {
- fprintf(stderr,"err_handler: %p %p\n",ecode,extra);
- return 1;
-}
-#endif
-
-static int
-cmd_ek(int argc, char **argv) {
- kill_proc(mainPid);
- return 0;
-}
-
-static int
-cmd_erl_start(int argc, char **argv) {
- ramlog_printf("\n");
- ramlog_printf("================================================================\n");
- ramlog_printf("\n");
-#ifdef DEBUG
- create_error_handler(get_bid(current_process()),err_handler,0x100);
-#endif
- erl_start(argc, argv);
- return 0;
-}
int
main(int argc, char **argv) {
- mainPid = current_process();
-
- shell_add_cmd_attrs("start_beam", "start_beam [params]", "Start the Erlang VM",
- cmd_erl_start, OS_PRI_PROC, 20, 0xF000);
- shell_add_cmd_attrs("ek", "ek", "Kills the Erlang VM",
- cmd_ek, OS_PRI_PROC, 20, 0x100);
+ erl_start(argc,argv);
stop(current_process());