Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Solution For Buffered Communication With Child Process #28

@brightprogrammer

Description

@brightprogrammer

Programs that use buffered I/O (don't disable buffering) can result in a deadlock with a parent process trying to read/write data from/to the child process stdout/stdin.

There are solutions that can make the child process think it's writing to a terminal, and as a result make the I/O unbuffered.

Find a cross platform solution for Linux, Windows and Mac and implement so we have more robust control.

Example scenario of deadlock:

  • child writes

  • child waits for input

  • parent tried to read what child wrote to stdout and then write back based on what it read

In this case if child I/O is buffered then it's possible that it does not flush and parent and child both keep waiting (deadlock)

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