if you can reproduce it w/ little a stand alone program, paste it up to gist.github.com i'll see if it happens on my machine and see if I can sort.. Never seen that problem..
Some stack overflow help sorted me.
I had to flush unit 0 (sterr) and unit 6 (stdout).
I'd started playing with unit 0 and 6, trying to close then open and minipulate them but had not met this flush subroutine.
I was checking my out.txt file while the program was running hence the output was still in the buffer. The strange thing is I'm not sure what I altered to cause this as it was not being held in the buffer. The lines I was commenting out were simple print statements I was using for some debugging. The only thing I can think is that these extra print statements filled up the buffer and hence it was flushed? This is all a bit beyond my knowledge.
Some stack overflow help sorted me.
I had to flush unit 0 (sterr) and unit 6 (stdout).
I was pointed towards
http://stackoverflow.com/questions/499879
my question
http://stackoverflow.com/questions/3661429/bash-std-err-and-sdt-out-redirection-failing
I'd started playing with unit 0 and 6, trying to close then open and minipulate them but had not met this flush subroutine.
I was checking my out.txt file while the program was running hence the output was still in the buffer. The strange thing is I'm not sure what I altered to cause this as it was not being held in the buffer. The lines I was commenting out were simple print statements I was using for some debugging. The only thing I can think is that these extra print statements filled up the buffer and hence it was flushed? This is all a bit beyond my knowledge.