[libdispatch-dev] DISPATCH_SOURCE_TYPE_READ fails with serial port file descriptors

Daniel A. Steffen dsteffen at apple.com
Thu Oct 20 10:43:08 PDT 2016

Hi Hans,

> On Oct 20, 2016, at 1:56, Hans Kröner <hans.kroener at icloud.com> wrote:
> Hi everyone,
> For a while now (since 10.8) I've been using dispatch_sources to read from serial ports. Up until 10.11.6 everything has been fine, but on 10.12.0 the source's event handler is not always being called when data is available for reading. I see it called a few times, but it often "stops" being called after a second or two - especially if new data has arrived on the serial port.

there is a potentially related kernel issue in kevent around serial devices that is being investigated internally.

> If the source's file descriptor happens to be a regular file, and not a serial port, everything continues to behave as expected. Has anybody else experienced something similar to this? I can provide a short code sample that exemplifies the issue, but you'll need a serial device sending data to the serial port in order to test it.

I would be great if you could file a report with your specific case so that we can make sure it is the same as the one above. You can use either bugs.swift.org (the issue tracker we use for bugs in the opensource libdispatch repository on github) or bugreport.apple.com.
Please let me know the numbers of the bugs you filed so that I can follow up.



> Thanks in advance!
> /Hans
> _______________________________________________
> libdispatch-dev mailing list
> libdispatch-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/libdispatch-dev

More information about the libdispatch-dev mailing list