summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2020-05-23 18:01:19 +0300
committerTDE Gitea <gitea@mirror.git.trinitydesktop.org>2020-05-26 08:36:59 +0000
commit44e4d3ce6b80000b7627baee2847ab5e1f7f7d99 (patch)
treea56725bef8a13cf839aefd4253cffdd8887873bc /kdesktop/lock
parent953eb33118f00b164d272876802aa8883dd5e8e7 (diff)
downloadtdebase-44e4d3ce6b80000b7627baee2847ab5e1f7f7d99.tar.gz
tdebase-44e4d3ce6b80000b7627baee2847ab5e1f7f7d99.zip
DilOS: use illumos specific /proc path for an executable file
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 114ce7ef0..1b9292a59 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -338,7 +338,11 @@ int main( int argc, char **argv )
int len;
char procpath[PATH_MAX];
char fullpath[PATH_MAX];
+#if defined(__dilos__)
+ snprintf(procpath, sizeof(procpath), "/proc/%d/path/a.out", pid);
+#else /* !__dilos__ */
snprintf(procpath, sizeof(procpath), "/proc/%d/exe", pid);
+#endif /* __dilos__ */
len = readlink( procpath, fullpath, sizeof(fullpath) );
if (len >= 0) {
fullpath[len] = 0;