]> Skullheadx's Git Forge - surf.git/commitdiff
Close standard output after printing XID, patch due Abby Cedar.
authorTroels Henriksen <athas@sigkill.dk>
Tue, 21 Feb 2012 11:00:01 +0000 (12:00 +0100)
committerTroels Henriksen <athas@sigkill.dk>
Tue, 21 Feb 2012 11:00:01 +0000 (12:00 +0100)
surf.c

diff --git a/surf.c b/surf.c
index 154957d48e435df5313f158fa652d51b9d4ff159..27cc4e945a6d531c56fbf2333630ec3c6bf59bca 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -548,6 +548,9 @@ newclient(void) {
                gdk_display_sync(gtk_widget_get_display(c->win));
                printf("%u\n", (guint)GDK_WINDOW_XID(GTK_WIDGET(c->win)->window));
                fflush(NULL);
+                if (fclose(stdout) != 0) {
+                       die("Error closing stdout");
+                }
        }
        return c;
 }