[pve-devel] [PATCH container v3] Create: fix architecture detection in restore_archive

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Dec 21 08:50:43 CET 2016


On 12/20/2016 12:04 PM, Dietmar Maurer wrote:
> We already have such code in
>
> PVE::LXC::Setup::protected_call()
>
> maybe it is worth factor out that code to PVE::Tools::forked_call()?

good catch, sounds OK to me.
My version has also a flaw left, i.e. if the parent receives an interrupt
during the single waitpid($child, 0).

Would it be OK that I exit with the return code of the sub method "$sub"
from the forked child as exit code?
This would be helpful as I'm using the exit code to pass some information
to the parents caller, which is for this specific case easier than opening a
pipe and parsing some text there.





More information about the pve-devel mailing list