From 8fc36c4ae2a860ca4ea004c49b39c394ed7fb1fa Mon Sep 17 00:00:00 2001 From: Denis Kozadaev Date: Sat, 23 May 2020 18:01:19 +0300 Subject: DilOS: use illumos specific /proc path for an executable file Signed-off-by: Denis Kozadaev (cherry picked from commit 44e4d3ce6b80000b7627baee2847ab5e1f7f7d99) --- kdesktop/lock/main.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kdesktop/lock') 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; -- cgit v1.2.3