Skip to content

NIOFileSystem: Writing to /dev/stdout only works if it's a pipe but not in a terminal #3613

Open

Description

@weissi

Expected behavior

  • writing to /dev/stdout works always

Actual behavior

in a terminal:

$ ./my-app
Error: Unknown: Could not write to file. ('pwrite' system call failed with '(6) Device not configured'.)

but if I add ./my-app | jq . then it works:

$ ./my-app
{
    ...
}

Steps to reproduce

        try await outputBytes.write(
            toFileAt: "/dev/stdout",
            options: .modifyFile(createIfNecessary: false)
        )

Activity

  1. added a commit that references this issue on Jul 22, 2026
    2d3c4a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions