Skip to content

all: many utils incorrectly retries when write failed with EINTR #12469

@oech3

Description

@oech3

#1275 and #8946 introduced retry when read/write catched EINTR. But it seems unconditional retry (without sighandler) is incorrect.

coreutils/coreutils#268 (comment)

For example, trace -o /dev/null -e inject=write:error=EINTR:when=2 tee should cause
tee: 'standard output': Interrupted system call (until we introduce zero-copy code path), but we don't do that.

We don't need to exactly match when=N, but we should not infinitely retry.

[Edit] read is unrelated. write should not retly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions