简体   繁体   中英

Linux equivalent of WaitCommEvent

I want to do an evented read on Serial port which will run only when the data is available.

I have tried sigaction but it causes problem when making a highly threaded application, also sleep function seem to work incorrectly according to many forums.

So I am looking for a similar way as in windows WaitCommEvent that is used in MSDN.

The canonical equivalents for linux systems is to use poll() or select() .

Workings are different of course.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM