View Single Post
Old 04-11-12, 11:43 AM   #6
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: Interesting observation with nvidia-settings and stderr redirection

I don't know why you can't see the same thing, or why only some attributes are affected and others are not.

However, an strace of this clearly shows a storm of
Code:
3348  ioctl(2, TIOCGWINSZ, {ws_row=83, ws_col=264, ws_xpixel=1867, ws_ypixel=1166}) = 0
That's not gonna work right if fd 2 isn't connected to the terminal. The straces clearly show that you do it regardless of whether fd 2 goes to the tty or is redirected. It seems a safe bet that not doing this to non-terminals will solve this problem.

ETA: You also do that "ioctl(2, ..." a total of 10404 times for the above command. That is probably one reason why it's so slow.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote