From cc1a0acb037a910035528b301cd18f81aece825f Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 11 Feb 2024 00:41:38 -0600 Subject: [PATCH] changed: debug socket uses pid --- compiler/src/wasm_runtime.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/src/wasm_runtime.c b/compiler/src/wasm_runtime.c index 0608f91b..a5832655 100644 --- a/compiler/src/wasm_runtime.c +++ b/compiler/src/wasm_runtime.c @@ -565,8 +565,11 @@ void onyx_run_initialize(b32 debug_enabled) { wasm_config_enable_debug(wasm_config, debug_enabled); #if defined(_BH_LINUX) || defined(_BH_DARWIN) + i32 getpid(); + i32 pid = getpid(); + char *env_path = getenv("ONYX_PATH"); - char *socket_path = bh_aprintf(bh_heap_allocator(), "%s/debug.0000", env_path); + char *socket_path = bh_aprintf(bh_heap_allocator(), "%s/debug.%d", env_path, pid); void wasm_config_set_listen_path(wasm_config_t *config, char *listen_path); wasm_config_set_listen_path(wasm_config, socket_path); -- 2.25.1