Skip to content

read() does not return after a call to close() #41

Open
@Sauci

Description

@Sauci

In the main(), I'm opening a can-isotp socket, and I perform write() operation on it. This part is working, the expected CAN frames are sent on the bus.
Now, I'm performing a blocking call to read() on a separated thread. This part is also working, I'm receiving the expected CAN frames.
The issue arises when I'm calling close() on the main() function. I would expect the read() function to return an error (such as EBADF or something similar), but instead of this, it keeps blocking, while the close() function returns 0.
Is it the expected behaviour? If it is the case, what is the proper way to exit from a blocking read()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions