[pbs-devel] [PATCH proxmox-backup v3] client: mount: wait for child to return before exiting

Gabriel Goller g.goller at proxmox.com
Tue Jun 18 16:03:55 CEST 2024


On 18.06.2024 15:44, Wolfgang Bumiller wrote:
>On Tue, Jun 18, 2024 at 03:35:56PM GMT, Gabriel Goller wrote:
>> diff --git a/proxmox-backup-client/src/mount.rs b/proxmox-backup-client/src/mount.rs
>> index b69e7e80..966ea1f9 100644
>> --- a/proxmox-backup-client/src/mount.rs
>> +++ b/proxmox-backup-client/src/mount.rs
>> @@ -183,7 +183,17 @@ fn mount(
>>          Ok(ForkResult::Parent { .. }) => {
>>              drop(pw);
>>              // Blocks the parent process until we are ready to go in the child
>> -            let _res = nix::unistd::read(pr.as_raw_fd(), &mut [0]).unwrap();
>> +            let mut buffer: Vec<u8> = vec![0];
>
>No need to use a `Vec` here, just use `let mut buffer = [0u8];`

Good point, submitted a v4!




More information about the pbs-devel mailing list