这是indexloc提供的服务,不要输入任何密码
Skip to content

Command output is not always displayed #1695

@dfffffff

Description

@dfffffff

Problem description
Command output is not always displayed when the command is also making the terminal exiting.
Only "[Process completed (code X) - press Enter]" is displayed.

Steps to reproduce
Make a small C program like:

#include <unistd.h>
int main(void)
{
    write(1, "########\n", 9);
    return 123;
}

Execute it with "exec ./smallprog" in a terminal.

Expected behavior
"########" should be always displayed.

Additional information
Some race condition occur, most of the time the output is displayed.
Sounds like sometime the process exit is processed before all buffered output is processed.
Also occur with shell script output.
Happen on stdout or stderr.
The bug is more apparent with Termux:Widget since the terminal is closed after execution, sometime on command error nothing is displayed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions