public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup v3] client: mount: wait for child to return before exiting
Date: Tue, 18 Jun 2024 16:03:55 +0200	[thread overview]
Message-ID: <20240618140355.y4odomyhgubq3dgo@luna.proxmox.com> (raw)
In-Reply-To: <lzfzyjzp73cyknbado5ompdgiokbexdkbbp6dgnyb7vkbsilfo@exije6apc43f>

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!


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


      reply	other threads:[~2024-06-18 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 13:35 Gabriel Goller
2024-06-18 13:44 ` Wolfgang Bumiller
2024-06-18 14:03   ` Gabriel Goller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240618140355.y4odomyhgubq3dgo@luna.proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=w.bumiller@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal