Fix starting page server in non-daemonize mode.

Commit 746f667311 moved the "chdir" earlier in the startup sequence,
before daemonizing. But it forgot to remove a corresponding chdir call
later in the sequence when not in daemonize mode. As a result, if you
tried to start the pageserver without the --daemonize option, it always
failed with "No such file or directory" error.
This commit is contained in:
Heikki Linnakangas
2021-05-19 08:49:09 +03:00
parent 2ff16da6af
commit a6178c135f

View File

@@ -195,14 +195,6 @@ fn start_pageserver(conf: &PageServerConf) -> Result<()> {
Ok(_) => info!("Success, daemonized"),
Err(e) => error!("Error, {}", e),
}
} else {
// change into the repository directory. In daemon mode, Daemonize
// does this for us.
std::env::set_current_dir(&conf.workdir)?;
info!(
"Changed current directory to repository in {:?}",
&conf.workdir
);
}
let mut threads = Vec::new();