On 09/03/11 11:30, Mark Morgan Lloyd wrote:
Henry Vermaak wrote:
On 08/03/11 10:30, Mark Morgan Lloyd wrote:
Can anybody say whether there is a good reason that serial.pp lacks a
function to read the CD signal?

Is SerFlush, which calls fpfsync, intended to discard input data, output
data or both?

fsync just makes sure all the in-kernel caches are written to the
device. Flushing input data is just a matter of reading it.

Thanks for that Henry. Obviously there's scope for confusion here with
the kernel's tcflush() and tcdrain() functions, where tcflush discards
input and/or output data.

You're right. Thinking about it, I don't know what the use of an fsync is in SerFlush, since you still don't know if it's been transmitted. I'd consider this a bug, SerFlush should use tcdrain.

Henry
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to