From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH] xenconsoled: close logfile when cleaning up domain
Date: Mon, 19 Jul 2010 09:03:03 +0100 [thread overview]
Message-ID: <11da502b927fd098186c.1279526583@localhost.localdomain> (raw)
Without this we leak an fd on each domain shutdown and eventually run
out of file descriptors meaning new the console of new domains are not
logged.
Seems to have been accidentally removed in 16638:28921e83000b.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
diff -r 81cc627934c6 -r 11da502b927f tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Mon Jul 19 09:01:24 2010 +0100
+++ b/tools/console/daemon/io.c Mon Jul 19 09:01:24 2010 +0100
@@ -747,6 +747,11 @@
{
domain_close_tty(d);
+ if (d->log_fd != -1) {
+ close(d->log_fd);
+ d->log_fd = -1;
+ }
+
free(d->buffer.data);
d->buffer.data = NULL;
reply other threads:[~2010-07-19 8:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11da502b927fd098186c.1279526583@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).