8000 timeout: fails to kill child process when given as sh -c · Issue #3489 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
timeout: fails to kill child process when given as sh -c #3489
Closed
@jfinkels

Description

@jfinkels

Environment: Ubuntu 20.04.4, coreutils v8.30, sh links to dash

The uutils version of timeout fails to kill the child process when it is given as sh -c "...".

GNU timeout:

$ timeout 1 sh -c "yes > /dev/null"
$ ps | grep [y]es
# no output, meaning no running process, as expected

uutils timeout:

$ ./target/release/timeout 1 sh -c "yes > /dev/null"
$ ps | grep [y]es
2458257 pts/1    00:00:02 yes

However, uutils timeout does correctly kill the child process when it is given directly:

$ ./target/release/timeout 1 yes > /dev/null
$ ps | grep [y]es
# no output, meaning no running process, as expected

This causes an orphan process in the GNU test case tests/split/filter.sh.

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

      0