]> git.proxmox.com Git - pve-common.git/commit
run_fork_with_timeout: allow returning complex structures
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 12 Sep 2017 11:25:30 +0000 (13:25 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 12 Sep 2017 11:37:56 +0000 (13:37 +0200)
commitf2c72fc3ba35b0ff951914bef6ca2c54dd7b52de
tree6ba690f767801ea3f962e6817147786901e1c46f
parenta4f181a37e2d3cfd116f7739f3e9f68ced99add3
run_fork_with_timeout: allow returning complex structures

Encode the result or the error in JSON. This way complex objects or
exceptions may be passed to the parent in a generic way.

This allows to remove the second pipe 'pipe_err'.

Allow also to return undef without any warnings to our caller.
This avoids a "use of uninitialized variable ..." warning

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