Flush writes to stdout, stderr
This commit is contained in:
parent
be88ccfcd4
commit
ac07041378
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 26 16:49:38 1997 Michael Meissner <meissner@cygnus.com>
|
||||
|
||||
* syscall.c (cb_syscall): If writing to stdout or stderr, flush
|
||||
the stream immediately.
|
||||
|
||||
Wed Nov 26 12:32:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* sim-io.c (sim_io_getstring): Delete unused len2.
|
||||
|
|
|
@ -318,9 +318,15 @@ cb_syscall (cb, sc)
|
|||
goto FinishSyscall;
|
||||
}
|
||||
if (fd == 1)
|
||||
result = (int) (*cb->write_stdout) (cb, buf, bytes_read);
|
||||
{
|
||||
result = (int) (*cb->write_stdout) (cb, buf, bytes_read);
|
||||
(*cb->flush_stdout) (cb);
|
||||
}
|
||||
if (fd == 2)
|
||||
result = (int) (*cb->write_stderr) (cb, buf, bytes_read);
|
||||
{
|
||||
result = (int) (*cb->write_stderr) (cb, buf, bytes_read);
|
||||
(*cb->flush_stderr) (cb);
|
||||
}
|
||||
else
|
||||
result = (int) (*cb->write) (cb, fd, buf, bytes_read);
|
||||
if (result == -1)
|
||||
|
|
Loading…
Reference in New Issue