"Daniel P. Berrange" <berrange(a)redhat.com> wrote:
...
Now previously since we just use 'execv' the QEMU process
would just
inherit all libvirtd's environment variables. When we now use execve()
no variables are inherited - we have to explicitly set all the ones
we need. I'm not sure what we should consider the mimimum required?
I'm merely setting 'LC_ALL=C' to ensure it runs in C locale. Do we
need to set $PATH for QEMU - maybe ? Anything else which is good
practice to set ?
If QEMU uses PATH, then propagating that is necessary.
I guess it's debatable whether to use PATH=$PATH or
to use some hard-coded default on the RHS. But using PATH=$PATH
seems friendlier, in case whatever QEMU uses is in some non-default
location.
If it uses mkstemp or the like, then including TMPDIR would be good.
Depending on QEMU, maybe things like HOME, USER, LOGNAME too.