[dev] [surf] [patch] Close stdout after printing XID

From: Abby Cedar <abbycedar_AT_yahoo.com.au>
Date: Sat, 18 Feb 2012 05:50:25 -0800 (PST)

Need to close stdout otherwise it can't be used in a script until surf finishes. To test, try the below before and after the patch. xid=`surf -x &`; echo $xid Patch: --- surf.c.orig    2012-02-19 00:29:24.735959037 +1100 +++ surf.c    2012-02-19 00:37:23.615959945 +1100 _AT_@ -548,6 +548,8 @@          gdk_display_sync(gtk_widget_get_display(c->win));          printf("%u\n", (guint)GDK_WINDOW_XID(GTK_WIDGET(c->win)->window));          fflush(NULL); +        if(freopen("/dev/null", "w", stdout) == NULL) +            die("Can't redirect stdout to /dev/null");      }      return c;  } -- Abby
Received on Sat Feb 18 2012 - 14:50:25 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 18 2012 - 15:00:06 CET