From 44e4d3ce6b80000b7627baee2847ab5e1f7f7d99 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 --- kdesktop/lock/main.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kdesktop') 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; -- cgit v1.2.1