]> git.ipfire.org Git - thirdparty/lxc.git/commit
tools: use fclose() after fdopen() + add newline 1128/head
authorChristian Brauner <cbrauner@suse.de>
Sat, 13 Aug 2016 23:01:04 +0000 (01:01 +0200)
committerChristian Brauner <cbrauner@suse.de>
Sat, 13 Aug 2016 23:54:32 +0000 (01:54 +0200)
commitb44c42e8f09eb78f85afb567b7ec847538156ae7
tree7ac000af6d765617cfa3354dc25106948975200c
parent4b281e126493c953a9e096e86ad4e96bcb3de144
tools: use fclose() after fdopen() + add newline

So far we accidently used close() on the original file descriptor. (After
fdopen() the original fd is considered private and should not be used anymore.
The close operations should be performed on the new file handle. We did the
correct thing on error but not on success.) Using close() on the original fd
caused "Text file busy" errors and prevented the cloned tmpfs container from
starting.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
src/lxc/tools/lxc_copy.c