summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2020-05-23 18:01:19 +0300
committerSlávek Banko <slavek.banko@axis.cz>2020-05-26 10:45:43 +0200
commit8fc36c4ae2a860ca4ea004c49b39c394ed7fb1fa (patch)
tree91707ab02d373fc2ccf70716137484eb4cde60d6 /kdesktop
parent8109d120933cf0738065194747f66499fca083d7 (diff)
downloadtdebase-8fc36c4ae2a860ca4ea004c49b39c394ed7fb1fa.tar.gz
tdebase-8fc36c4ae2a860ca4ea004c49b39c394ed7fb1fa.zip
DilOS: use illumos specific /proc path for an executable file
Signed-off-by: Denis Kozadaev <denis@dilos.org> (cherry picked from commit 44e4d3ce6b80000b7627baee2847ab5e1f7f7d99)
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/lock/main.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index e0ba2b662..d35c86957 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -330,7 +330,11 @@ int main( int argc, char **argv )
int len;
char procpath[PATH_MAX];
char fullpath[PATH_MAX];
- snprintf(procpath, sizeof(procpath), "/proc/%d/exe", pid);
+#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;