[lxc-devel] [lxc/lxc] 36eaa6: fix fd leak in test-concurrent
GitHub
noreply at github.com
Fri Mar 7 22:56:19 UTC 2014
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 36eaa694151aff72a74987034d5f0eeb4261951c
https://github.com/lxc/lxc/commit/36eaa694151aff72a74987034d5f0eeb4261951c
Author: Dwight Engen <dwight.engen at oracle.com>
Date: 2014-03-07 (Fri, 07 Mar 2014)
Changed paths:
M src/lxc/log.c
M src/lxc/lxccontainer.h
M src/tests/concurrent.c
Log Message:
-----------
fix fd leak in test-concurrent
Opening a debug log for every thread at every iteration of test-concurrent
causes it to quickly run out of fd's because this fd is leaked. Fix this
by adding a new api: lxc_log_close().
As Caglar noted, the log handling is in general a bit "interesting" because
a logfile can be opened through the per-container api
c->set_config_item("lxc.logfile") but lxc_log_fd is now per-thread data. It
just so happens in test-concurrent that there is a 1:1 mapping of threads
to logfiles.
Split out getting debug logs from quiet since I think they are useful
separately. If debug is specified, get a log of any mode, not just during
start.
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
More information about the lxc-devel
mailing list