aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/ending-run.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-01-21 18:46:33 +0000
committerJim Blandy <jimb@codesourcery.com>2002-01-21 18:46:33 +0000
commit808a31f526cb1a0fef4dc2c1e4a66af986815eaf (patch)
tree823ae94718e0d9785580495bd336a731f9ea545f /gdb/testsuite/gdb.base/ending-run.c
parent9596feeafe1f8d192ca4b99c6c491630eaa855e0 (diff)
downloadgdb-808a31f526cb1a0fef4dc2c1e4a66af986815eaf.zip
gdb-808a31f526cb1a0fef4dc2c1e4a66af986815eaf.tar.gz
gdb-808a31f526cb1a0fef4dc2c1e4a66af986815eaf.tar.bz2
* gdb.base/ending-run.c (main): Avoid messing with setvbuf; just
call `fflush' after every `printf', so that the output is produced at predictable points, regardless of whatever buffering does (or doesn't) take place. * gdb.base/ending-run.exp: Adjust tests to expect output to appear at different points.
Diffstat (limited to 'gdb/testsuite/gdb.base/ending-run.c')
-rw-r--r--gdb/testsuite/gdb.base/ending-run.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/ending-run.c b/gdb/testsuite/gdb.base/ending-run.c
index ccf8c50..8c67706 100644
--- a/gdb/testsuite/gdb.base/ending-run.c
+++ b/gdb/testsuite/gdb.base/ending-run.c
@@ -22,12 +22,12 @@ int main()
int i;
p = (int *) malloc( 4 );
- setvbuf (stdout, alloca (64), _IOLBF, 64);
+
for (i = 1; i < 10; i++)
{
printf( "%d ", callee( i ));
-
+ fflush (stdout);
}
- printf( " Goodbye!\n" );
+ printf( " Goodbye!\n" ); fflush (stdout);
return 0;
}