]> xenbits.xensource.com Git - xen.git/commitdiff
Without this we leak an fd on each domain shutdown and eventually run
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 2 Aug 2010 10:16:31 +0000 (11:16 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 2 Aug 2010 10:16:31 +0000 (11:16 +0100)
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>
xen-unstable changeset:   21818:9ccd024065c5
xen-unstable date:        Mon Jul 19 12:21:24 2010 +0100

tools/console/daemon/io.c

index 22833d746998ec71bd8caff84fffc79fed0c0c5b..61b268764d244b569ba1470a560a7d92bc36d1a1 100644 (file)
@@ -748,6 +748,11 @@ static void cleanup_domain(struct domain *d)
 {
        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;