Instead of duplicating the cleanup-code, once for success and once for failure,
simply keep a variable fret which is -1 in the beginning and gets set to 0 on
success or stays -1 on failure.
Signed-off-by: Christian Brauner
---
src/lxc/conf.c | 14 ++
1
When no explicit workdir is given we simply create a random workdir using
mkdtemp().
Signed-off-by: Christian Brauner
---
src/lxc/conf.c | 31 ---
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/src/lxc/conf.c
- When no explicit workdir is given we simply create a random workdir using
mkdtemp().
- The temporary workdir is not removed when the container stops as it is not
obvious to me at this point how to do this cleanly. This means that it is left
to the user to clean up old random workdirs. I