Skip to content

Make stdout linebuffered  #9

Open
@rosik

Description

@rosik

Since you redirect both stdout and stderr to a pipe and capture it together, both should be linebuffered to produce nice output.

Here is a PoC:

local ffi = require('ffi')

ffi.cdef([[
  typedef struct __IO_FILE FILE;
  void setlinebuf(FILE *stream);
  FILE *stdout;
  FILE *stderr;
]])

ffi.C.setlinebuf(ffi.C.stdout)
ffi.C.setlinebuf(ffi.C.stderr)

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