mirror of
https://github.com/zaphar/clio.git
synced 2025-07-22 12:09:48 -04:00
fix: issue with opening a file in truncate mode
This commit is contained in:
parent
ece2e6ad7a
commit
9c5da58363
@ -47,7 +47,7 @@ struct Args {
|
||||
}
|
||||
|
||||
async fn write_pid_file(p: &PathBuf) -> anyhow::Result<()> {
|
||||
let mut pid_file = File::options().create(true).truncate(true).open(p).await?;
|
||||
let mut pid_file = File::create(p).await?;
|
||||
let id = std::process::id().to_string();
|
||||
pid_file.write(id.as_bytes()).await?;
|
||||
pid_file.sync_all().await?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user