Closed
Description
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
.