master - test: Clean up fds properly in the runner.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bf1693786905777d0ad0857797fe742889eebcd4 Commit: bf1693786905777d0ad0857797fe742889eebcd4 Parent: d2dbc65f00abe5ccf44af3545a1ec1ddd5ebdad7 Author: Petr Rockai <[email protected]> AuthorDate: Thu Jun 26 01:08:57 2014 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Thu Feb 5 13:47:16 2015 +0100
test: Clean up fds properly in the runner.
--- test/lib/runner.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
test/lib/runner.cpp +3 -1
@@ -75,6 +75,7 @@ struct TestProcess close( STDIN_FILENO ); dup2( fd, STDOUT_FILENO ); dup2( fd, STDERR_FILENO ); + close( fd ); } environment();
@@ -225,7 +226,7 @@ struct TestCase { else r = Journal::FAILED; - ::close( io.fd ); + io.close(); /* if ((fd_debuglog = open(testdirdebug, O_RDONLY)) != -1) {
@@ -247,6 +248,7 @@ struct TestCase { io.close(); child.exec(); } else { + ::close( child.fd ); journal->started( name ); progress( First ) << tag( "running" ) << name << std::flush; if ( options.verbose || options.interactive )