diff options
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event.rs b/src/event.rs index cc26bf22..f8044609 100644 --- a/src/event.rs +++ b/src/event.rs @@ -176,7 +176,8 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> { let proc_prefix = ""; #[cfg(target_os = "freebsd")] let proc_prefix = "/compat/linux"; - if let Ok(path) = fs::read_link(format!("{}/proc/{}/cwd", proc_prefix, unsafe { tty::PID })) { + let link_path = format!("{}/proc/{}/cwd", proc_prefix, tty::child_pid()); + if let Ok(path) = fs::read_link(link_path) { vec!["--working-directory".into(), path] } else { Vec::new() |