projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29df205
)
changed: debug socket uses pid
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sun, 11 Feb 2024 06:41:38 +0000
(
00:41
-0600)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sun, 11 Feb 2024 06:41:38 +0000
(
00:41
-0600)
compiler/src/wasm_runtime.c
patch
|
blob
|
history
diff --git
a/compiler/src/wasm_runtime.c
b/compiler/src/wasm_runtime.c
index 0608f91b926bacb971205f888218c4409e251dbf..a58326559b1df698da248283c230e4df38874cbb 100644
(file)
--- 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);