bug-sourceinstall
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-sourceinstall] Re: patch for sourceinstaller


From: Brian Gough
Subject: [bug-sourceinstall] Re: patch for sourceinstaller
Date: Sat, 05 Dec 2009 22:05:06 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)

At Tue, 1 Dec 2009 00:09:50 +0100,
Claudio Fontana wrote:
> On Sun, Nov 29, 2009 at 10:39 PM, Brian Gough <address@hidden> wrote:
> > Hello.  I've been testing a lot of packages and found that the stderr and
> > stdout output from the sourceinstall command-line tool can get mixed
> > up if they are redirected to a file -- I think they need to be
> > line-buffered.
> >
> > The patch below avoids the problem -- not sure if sourceinstall.c is
> > the best place for it though, maybe it should go in libsrcinstall?
> 
> I think so, yes. libsrcinst would be the place to do it, so that for example
> sourceinstall-gtk can profit from the change as well.

Here's a revised location for the patch:

Index: srcinst.c
===================================================================
RCS file: /sources/sourceinstall/sourceinstall2/libsrcinst/srcinst.c,v
retrieving revision 1.24
diff -u -r1.24 srcinst.c
--- srcinst.c   8 Dec 2007 15:51:29 -0000       1.24
+++ srcinst.c   5 Dec 2009 22:05:14 -0000
@@ -73,6 +73,10 @@
 {
     _init_state();
 
+    /* Make output line-buffered */
+    setvbuf(stdout, (char *)NULL, _IOLBF, 0);
+    setvbuf(stderr, (char *)NULL, _IOLBF, 0);
+
 #if ENABLE_NLS
     bindtextdomain(PACKAGE, LOCALEDIR);
 #endif /* ENABLE_NLS */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]