|
From: Lachlan A. <lh...@us...> - 2003-04-04 23:41:22
|
Sorry Aaron, I don't know what could be causing the problem. However,=20 the fact that there are fewer write()s when the ouput is a file is=20 to be expected. Output is "block-buffered" if the output is not a=20 terminal, which means it saves up 4096 bytes before writing. If the=20 output is a tty, the data is "line-buffered", which means it is=20 written after every '\n'. There *shouldn't* be a need to flush stdout unless the program exits=20 abnormally (e.g. segfaults). Is the resulting file a multiple of=20 4096 bytes long? What happens if you simply pipe the output through =20 more/less? Is it still truncated? Good luck! Lachlan On Saturday 05 April 2003 07:21, Aaron Bush wrote: > If i run htsearch from the command line and allow the output to go > to the screen the results appear complete and proper. If i run > htsearch from the command line and redirect the output to a file > via ">/tmp/pg" or from a browser via apache then the results will > be truncated. I have ran strace against htsearch with output to > the screen and to a file and there are clearly some missing > write()'s. |