WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xenconsoled: close logfile when cleaning up domain

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xenconsoled: close logfile when cleaning up domain
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 19 Jul 2010 09:03:03 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 19 Jul 2010 01:03:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxx>

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;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xenconsoled: close logfile when cleaning up domain, Ian Campbell <=