]> git.proxmox.com Git - pve-container.git/commit
create: refactor arch detection to run_fork_with_timeout
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 16 Nov 2017 14:07:40 +0000 (15:07 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 23 Nov 2017 12:14:57 +0000 (13:14 +0100)
commitfbb31447b711b62c90986bff91a9ba5feb807f66
treea7e771a1bcd99a604facf4c17dcbe6a4581f5a10
parent8632d8eb680ec8c156b3ce7b375ed7c3612666e5
create: refactor arch detection to run_fork_with_timeout

Swap out our own fork/waitpid code with run_fork_with_timeout, which
not only allows to return arbitrary results from the called method
but also has a timeout configured, which prevents that a creation
hangs forever (= next reboot).

As we can now return more than with an exit code number we do not
return the ELF class but the detected architecture directly and pull
the fallback code into this method.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC/Create.pm