Skip to content

setBlocking logic garbles the fileno flags #44

@headius

Description

@headius

While investigating why nonblocking does not seem to work exactly right for unix sockets, I found that the flags seem to be getting garbled by the existing setBlocking logic.

For logic that sets it to nonblock, the flags start as 2, then with O_NONBLOCK they become 6 and are set back into fcntl. By the time it tries to set it blocking again, the flags are nonsense. Once I saw 194, and another time 491294 or something like that.

By contrast a version using the fcntl bound by jnr-posix seems to properly set it to 6 and back to 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions