[pve-devel] [RFC common v3 10/34] env: add module with helpers to run a Perl subroutine in a user namespace

Fiona Ebner f.ebner at proxmox.com
Tue Nov 12 11:19:52 CET 2024


On 11.11.24 7:33 PM, Thomas Lamprecht wrote:
> Am 07.11.24 um 17:51 schrieb Fiona Ebner:
>> +package PVE::Env;
> 
> can this module and it's name be more specific to doing stuff with/in namespaces?
> 
> e.g. PVE::Namespaces or PVE::Sys::Namespaces (there might be other stuff that might
> fit well in a future libproxmox-sys-perl and Proxmox::Sys::* respectively, so
> maybe that module path would be better?)
> 
> I'd also make all sub's private if not really intended to be used outside
> this module.
> 

Will do!

> If the more general fork/wait-child helpers are needed elsewhere, or deemed
> to be useful, then they could go in their own module, like e.g. PVE::Sys::Process
> 

Since you already pointed out a potential user, will go for this too.

>> +sub forked(&%) {
> 
> FWIW, there's some "forked" method in test/lock_file.pl that this might replace too,
> if it stay public.
> 

I'll check if it can be adapted easily.




More information about the pve-devel mailing list