Quote Originally Posted by kuzulis View Post
Hi all.
And why different descriptors for reading and writing device?
(You can also open once a one descriptor for reading and writing!)
You can but that will not work across all devices. Some devices for example are read-only, so if you try to open them as read/write the call will fail, but if you have seperate read and write only the write will fail, so you know the device is read-only and don't need to do additional work (such as reopening as read only and setting a read-only flag). Typically however you will know this before writing code but as an example it is impossible to know this in advance.