Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

asiga

macrumors 65816
Original poster
Nov 4, 2012
1,029
1,330
Not exactly a programming question, but if you use Terminal you're likely a programmer, so I feel it's the best suited subforum:

Have you noticed the Terminal window having some delay when refreshing stdout/stderr output from command line programs? I'm on 10.11.6 now, and I think it didn't happen in the first El Capitan versions, I believe this lagging came with some 10.11.x update.

It's a several-seconds delay. I think you cancel the delay when moving the mouse pointer over the Terminal window, then it gets refreshed (or that's my impression).

Do you experience it? Does it affect Sierra too? Did you fix it somehow?
 

techwarrior

macrumors 65816
Jul 30, 2009
1,250
498
Colorado
If the delay occurs when first launching Terminal or new tabs, clearing out log files can help:

sudo rm -rf /private/var/log/asl/*.asl

Also, on Preferences > Startup tab, specify "Shells Open With" and enter the path for your preferred shell, for instance:

/bin/bash

Apparently, the later enables terminal to open without searching for the shell profile.
 

asiga

macrumors 65816
Original poster
Nov 4, 2012
1,029
1,330
If the delay occurs when first launching Terminal or new tabs, clearing out log files can help:

sudo rm -rf /private/var/log/asl/*.asl

Also, on Preferences > Startup tab, specify "Shells Open With" and enter the path for your preferred shell, for instance:

/bin/bash

Apparently, the later enables terminal to open without searching for the shell profile.
It doesn't happen when launching the Terminal window, but when running command-line executables on it. Imagine you have a command line C program that performs some computation and outputs a lot of floating point numbers to stdout. In previous OS X versions, the stdout output was immediate (no matter if the program called fflush(stdio) or not). Now, on 10.11.6 (an perhaps also in some earlier 10.11.x updates but not in the first ones), the program finishes, and after a couple of seconds you see the stdout output. It's like if now there was some buffer awaiting to get flushed (but it doesn't obey to fflush()). As I said, I have the impression that if I move the mouse over the Terminal window, then it flushes the output instantly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.