Re: BASH Redirect (STDOUT & STDERR) Syncing

From: Bruno Hertz (brrhtz_at_yahoo.de)
Date: 04/12/05

  • Next message: Michael S. Peek: "Debian + Debian Installer(Sid) + 2.6 kernel + SATA"
    To: debian-user@lists.debian.org
    Date: Tue, 12 Apr 2005 16:06:08 +0200
    
    

    michael <linux@networkingnewsletter.org.uk> writes:

    >> > Actually, I've noticed this for many things I've run from the cmd line
    >> > in Debian (and have noticed it not happening for other Unices)... the
    >> > only thing that springs to mind at the moment is output from 'make'
    >> > having std err and std out well out of sync.... any ideas what might be
    >> > going on here? (Debian GNU/Linux, 2.4.27-1-686-smp, Sarge apt updates)
    >>
    >> Hmmm, not sure I can confirm this. Especially with command line tools
    >> it's common practice to do line buffering when output is directed to a
    >> terminal and block buffering otherwise, e.g. in pipes or when output
    >> is redirected into a file.
    >>
    >> Especially regarding block buffering, if a program doesn't take extra
    >> measures it's buffering strategy will usually be governed by the
    >> standard library, i.e. glibc. And in that case the only possible
    >> reason for differing behavior on different platforms could only be
    >> some config option given to glibc, presumably during compilation time,
    >> targeting e.g. the buffer size. This may be possible, but at least I'm
    >> not aware of Debian doing something special in that regard and can't
    >> myself really say that Sarge behaves any different than, say, FC3.
    >>
    >> Maybe somebody else knows more ?
    >>
    >> Regards, Bruno.
    >>
    >
    > okay, a quick try to recreate this failed, so let me try another time
    > when less busy. it may be that I did something silly like a parallel
    > compile in which case I'd expect a bit of a mess in the make-log for
    > make -j 2 > make-log 2>&1
    > sort of thing
    >
    > NB: I was comparing outputs with not just other Linux dists but IRIX too

    Sure, but if you didn't link (GNU?) make against glibc on IRIX either,
    but rather against the native libc, differences in output buffering
    shouldn't be that surprising I guess. That is, if output streams
    default buffer sizes weren't part of any standard, and I think they
    aren't, it'd be left to the implementor to choose some value.

    Let us know though if you can reproduce behavior which may be
    considered irregular. Always nice to investigate these kind of things
    ...

    Regards, Bruno.

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Michael S. Peek: "Debian + Debian Installer(Sid) + 2.6 kernel + SATA"

    Relevant Pages

    • Re: Win 8 - Win 9 codec which would have less buffering?
      ... Is win 9 superior to win 8 in regards to the streaming experience regarding ... I am aware of a superior image & audio quality ... ... buffering " would be the same. ... Should be no difference in regards to buffering/rebuffering if they're the same ...
      (microsoft.public.windowsmedia.server)
    • Re: vid update
      ... > Five Sharp wrote: ... >> Regards, ... > "buffering" at 10%... ... > Not your fault, obviously - but that of the website involved. ...
      (uk.music.guitar)
    • Re: Graphics Problem
      ... > sleepinside the while loop. ... Hi Oliver, ... now looking into double buffering. ... Regards, ...
      (comp.lang.java.gui)
    • Re: vid update
      ... "Zippy" videos? ... "buffering" at 10%... ...
      (uk.music.guitar)
    • Re: BASH Redirect (STDOUT & STDERR) Syncing
      ... >Especially regarding block buffering, if a program doesn't take extra ... >standard library, i.e. glibc. ... Standard output is line-buffered if the output is a terminal, ...
      (Debian-User)