mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-15 20:20:38 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user