projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.9.13.3:
[sbcl.git]
/
src
/
runtime
/
linux-os.c
diff --git
a/src/runtime/linux-os.c
b/src/runtime/linux-os.c
index
2b1dd25
..
345ff48
100644
(file)
--- a/
src/runtime/linux-os.c
+++ b/
src/runtime/linux-os.c
@@
-370,3
+370,18
@@
os_install_interrupt_handlers(void)
sig_stop_for_gc_handler);
#endif
}
sig_stop_for_gc_handler);
#endif
}
+
+char *
+os_get_runtime_executable_path()
+{
+ char path[PATH_MAX + 1];
+ int size;
+
+ size = readlink("/proc/self/exe", path, sizeof(path)-1);
+ if (size < 0)
+ return NULL;
+ else
+ path[size] = '\0';
+
+ return copied_string(path);
+}