diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-03-14 06:55:12 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-03-14 06:55:12 +0000 |
commit | b9f4b52e69fa852942a1d7102559fdddf0a9f2e2 (patch) | |
tree | 0a135b4d504125a10a24c5274de0c63df2559390 /examples/Mem_Map/IO-tests | |
parent | 793d527cb0a297a08dd83499ac26736dcec2950d (diff) | |
download | ATCD-b9f4b52e69fa852942a1d7102559fdddf0a9f2e2.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples/Mem_Map/IO-tests')
-rw-r--r-- | examples/Mem_Map/IO-tests/IO_Test.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/Mem_Map/IO-tests/IO_Test.cpp b/examples/Mem_Map/IO-tests/IO_Test.cpp index bed887dc2b1..aef0b12c597 100644 --- a/examples/Mem_Map/IO-tests/IO_Test.cpp +++ b/examples/Mem_Map/IO-tests/IO_Test.cpp @@ -140,8 +140,11 @@ Mmap1_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) this->tm_.start (); while (--iterations >= 0) - if (ACE_OS::write (fileno (output_fp), src, map_input.size ()) == -1) - return -1; + { + if (ACE_OS::write (fileno (output_fp), src, map_input.size ()) == -1) + return -1; + ACE_OS::lseek (fileno (output_fp), 0, SEEK_SET); + } this->tm_.stop (); } @@ -161,7 +164,7 @@ int Mmap2_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) { ACE_Mem_Map map_input (fileno (input_fp)); - int size = map_input.size (); + int size = map_input.size (); ACE_Mem_Map map_output (fileno (output_fp), size, PROT_WRITE, MAP_SHARED); void *src = 0; void *dst = 0; |