[LUGOS-PROG] Zapiranje serijskih portov
Anze
anze at volja.net
Mon Jan 10 23:41:22 CET 2005
Zivjo!
Zakaj najdem odgovor vedno takoj zatem, ko posljem vprasanje?
---
When you're done with the port, and want to close it, be aware of a very
nasty little hazard on some systems; if there's any pending output waiting
to be written to the device (e.g. if output flow is stopped by hardware or
software handshaking), your process can hang *unkillably* in the `close()'
call until the output drains. Calling `tcflush()' to discard any pending
output is probably a wise move.
(Blocked output on tty devices is by far the most common cause of
"unkillable" processes in my experience.)
---
Upam, da bo komu pomagalo. :-)
LP!
Anze
More information about the lugos-prog
mailing list