hotfix(server): Maintain working directory while daemonization

This commit is contained in:
Kunal Mohan 2021-05-17 15:53:21 +05:30
parent 51f1b53fe2
commit 84911619b2

View file

@ -96,7 +96,7 @@ impl Drop for SessionMetaData {
pub fn start_server(os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) { pub fn start_server(os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
#[cfg(not(any(feature = "test", test)))] #[cfg(not(any(feature = "test", test)))]
daemonize::Daemonize::new() daemonize::Daemonize::new()
.working_directory(std::env::var("HOME").unwrap()) .working_directory(std::env::current_dir().unwrap())
.umask(0o077) .umask(0o077)
.start() .start()
.expect("could not daemonize the server process"); .expect("could not daemonize the server process");