mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-02 12:11:40 +00:00
use new fsync parameter to replace_file and atomic_open_or_create
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
b87aa76b64
commit
e9bea7b7ed
@ -30,7 +30,7 @@ tokio-openssl = "0.6.1"
|
||||
tower-service = "0.3.0"
|
||||
url = "2.1"
|
||||
|
||||
proxmox = "0.14.0"
|
||||
proxmox = "0.15.0"
|
||||
proxmox-io = "1"
|
||||
proxmox-lang = "1"
|
||||
proxmox-router = "1.1"
|
||||
|
@ -95,7 +95,7 @@ impl FileLogger {
|
||||
flags |= OFlag::O_EXCL;
|
||||
}
|
||||
|
||||
let file = atomic_open_or_create_file(&file_name, flags, &[], options.file_opts.clone())?;
|
||||
let file = atomic_open_or_create_file(&file_name, flags, &[], options.file_opts.clone(), false)?;
|
||||
|
||||
Ok(file)
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ pub(crate) fn pstart() -> u64 {
|
||||
/// Helper to write the PID into a file
|
||||
pub fn write_pid(pid_fn: &str) -> Result<(), Error> {
|
||||
let pid_str = format!("{}\n", *PID);
|
||||
proxmox::tools::fs::replace_file(pid_fn, pid_str.as_bytes(), CreateOptions::new())
|
||||
proxmox::tools::fs::replace_file(pid_fn, pid_str.as_bytes(), CreateOptions::new(), false)
|
||||
}
|
||||
|
||||
/// Helper to read the PID from a file
|
||||
|
@ -146,6 +146,7 @@ impl WorkerTaskSetup {
|
||||
&self.active_tasks_fn,
|
||||
active_raw.as_bytes(),
|
||||
options,
|
||||
false,
|
||||
)?;
|
||||
|
||||
finish_list.sort_unstable_by(|a, b| {
|
||||
@ -166,6 +167,7 @@ impl WorkerTaskSetup {
|
||||
OFlag::O_APPEND | OFlag::O_RDWR,
|
||||
&[],
|
||||
options,
|
||||
false,
|
||||
)?;
|
||||
for info in &finish_list {
|
||||
writer.write_all(render_task_line(&info).as_bytes())?;
|
||||
|
Loading…
Reference in New Issue
Block a user