Am 17.11.25 um 12:31 PM schrieb Robert Obkircher:
> 
> On 11/13/25 17:35, Fiona Ebner wrote:
>> Am 13.11.25 um 4:04 PM schrieb Robert Obkircher:
>>> diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook
>>> index 73125e1..f5dd728 100755
>>> --- a/src/lxc-pve-prestart-hook
>>> +++ b/src/lxc-pve-prestart-hook
>>> @@ -28,17 +28,6 @@ eval {
>>>       $have_sdn = 1;
>>>   };
>>>   -my $WARNFD;
>>> -
>>> -sub log_warn {
>>> -    my ($vmid, $message) = @_;
>>> -
>>> -    if (!defined($WARNFD)) {
>>> -        open($WARNFD, '>', "/run/pve/ct-${vmid}.warnings");
>>> -    }
>>> -    print $WARNFD "$message\n";
>>> -}
>>> -
>>>   PVE::LXC::Tools::lxc_hook(
>>>       'pre-start',
>>>       'lxc',
>>> @@ -53,6 +42,15 @@ PVE::LXC::Tools::lxc_hook(
>>>             PVE::RESTEnvironment->setup_default_cli_env();
>>>   +        my $warn_file = "/run/pve/ct-${vmid}.warnings";
>>> +        # open eagerly so logging works inside the protected_call
>>> chroot
>> Nit: Maybe "early" instead of "eagerly"?
> I was specifically thinking about eager/lazy evaluation.

Personally, I wouldn't call having code inside a CODE ref/sub variable
"lazily evaluated". The code hasn't been called yet, not just not
evaluated. Or do you mean something else?


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to