From: Troels Henriksen Date: Tue, 21 Feb 2012 11:00:01 +0000 (+0100) Subject: Close standard output after printing XID, patch due Abby Cedar. X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=96041e5ba2e19a077cb8aead03899c0b1eef529a;p=surf.git Close standard output after printing XID, patch due Abby Cedar. --- diff --git a/surf.c b/surf.c index 154957d..27cc4e9 100644 --- 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; }