diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-09-16 14:49:31 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-09-16 14:49:31 +0200 |
commit | a3912421bf69ee2aae4e7c8c9a522478c2427120 (patch) | |
tree | e6a9e086b4b7628aad35caa05588d093853633ef /erts/emulator/sys | |
parent | f7d2fe5e4094cf135b950cc4eeab91adde1ac3f6 (diff) | |
parent | a6b27d639e5c7c85e765331cfe7befbe23c4954b (diff) | |
download | otp-a3912421bf69ee2aae4e7c8c9a522478c2427120.tar.gz otp-a3912421bf69ee2aae4e7c8c9a522478c2427120.tar.bz2 otp-a3912421bf69ee2aae4e7c8c9a522478c2427120.zip |
Merge branch 'dev' into major
* dev:
Move init of smp rw mutex from init to sys_args to make sure that it is initialized before the first erts_sys_getenv call
Move erts_sys_env_init() to erts_sys_pre_init()
Remove _DEBUG from start_erl.c
Spelling correction in erlsrv doc
Convert windows start_erl to take rootdir on command line
Add command start_disabled to erlsrv
Add global lock for erlsrv to avoid races
Change start order so that service_event gets initialized before it's used
Conflicts:
erts/emulator/sys/win32/sys.c
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r-- | erts/emulator/sys/unix/sys.c | 4 | ||||
-rw-r--r-- | erts/emulator/sys/win32/sys.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c index fd15635168..f2fd01e236 100644 --- a/erts/emulator/sys/unix/sys.c +++ b/erts/emulator/sys/unix/sys.c @@ -527,7 +527,6 @@ erts_sys_pre_init(void) void erl_sys_init(void) { - erts_smp_rwmtx_init(&environ_rwmtx, "environ"); #if !DISABLE_VFORK { int res; @@ -3088,6 +3087,8 @@ get_value(char* rest, char** argv, int* ip) void erl_sys_args(int* argc, char** argv) { + erts_smp_rwmtx_init(&environ_rwmtx, "environ"); + int i, j; i = 1; @@ -3151,4 +3152,5 @@ erl_sys_args(int* argc, char** argv) argv[j++] = argv[i]; } *argc = j; + } diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index ce1d376a54..94c39dc2c5 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -3283,6 +3283,7 @@ erts_sys_pre_init(void) } #endif erts_smp_atomic_init_nob(&sys_misc_mem_sz, 0); + erts_sys_env_init(); } void noinherit_std_handle(DWORD type) @@ -3298,8 +3299,6 @@ void erl_sys_init(void) { HANDLE handle; - erts_sys_env_init(); - noinherit_std_handle(STD_OUTPUT_HANDLE); noinherit_std_handle(STD_INPUT_HANDLE); noinherit_std_handle(STD_ERROR_HANDLE); |