summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-05-26 02:28:32 +0200
committerTDE Gitea <gitea@mirror.git.trinitydesktop.org>2020-05-26 08:36:59 +0000
commit4ef8f959121b47c02683ce363892e8d3f8381d30 (patch)
treecbbd138b4f82526b6b639ad2bba68332e2d5fd94 /kdesktop/lock
parent44e4d3ce6b80000b7627baee2847ab5e1f7f7d99 (diff)
downloadtdebase-4ef8f959121b47c02683ce363892e8d3f8381d30.tar.gz
tdebase-4ef8f959121b47c02683ce363892e8d3f8381d30.zip
Add FreeBSD / DragonFly specific /proc path for an executable file.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/main.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 1b9292a59..f1407070c 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -340,9 +340,11 @@ int main( int argc, char **argv )
char fullpath[PATH_MAX];
#if defined(__dilos__)
snprintf(procpath, sizeof(procpath), "/proc/%d/path/a.out", pid);
-#else /* !__dilos__ */
+#elif defined(__FreeBSD__) || defined (__DragonFly__)
+ snprintf(procpath, sizeof(procpath), "/compat/linux/proc/%d/exe", pid);
+#else /* Linux way as default */
snprintf(procpath, sizeof(procpath), "/proc/%d/exe", pid);
-#endif /* __dilos__ */
+#endif
len = readlink( procpath, fullpath, sizeof(fullpath) );
if (len >= 0) {
fullpath[len] = 0;