Skip to content

First command output latency: output visible after command ends #2262

@actondev

Description

@actondev

I noticed that the first command wasn't showing in emacs when compiling until it finished & I was assuming it was an emacs issue.

As far as I understand [0] is the same command as [1] but showing when it started running?
The issue is that when ninja is spawned as a subprocess, I don't see any feedback until the first command has finished. When Just running ninja in the terminal though, I get immediate feedback.

It's also noticeable when redirecting to a file. The first command [0] cmd.. will not get written to the file, while everything else does.

  • ninja > out : first command [0] not shown
  • ninja | tee out: again [0] not written
  • unbuffer ninja >out: [0] gets written

The issue also appears when running ninja -v. With this even when running the command in the terminal, we won't get the first command written to the stdout until it finishes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions