summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTroels Henriksen <athas@sigkill.dk>2012-02-21 12:00:01 +0100
committerTroels Henriksen <athas@sigkill.dk>2012-02-21 12:00:01 +0100
commit96041e5ba2e19a077cb8aead03899c0b1eef529a (patch)
tree9f7c57636e30e16e98195d205d1b0fd6d17b6086
parent6af15aa636ae72f1cbd89ed93ea1e5b0c9ddfa02 (diff)
downloadsurf-96041e5ba2e19a077cb8aead03899c0b1eef529a.tar.gz
surf-96041e5ba2e19a077cb8aead03899c0b1eef529a.tar.bz2
surf-96041e5ba2e19a077cb8aead03899c0b1eef529a.zip
Close standard output after printing XID, patch due Abby Cedar.
-rw-r--r--surf.c3
1 files changed, 3 insertions, 0 deletions
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;
}