coreutils
coreutils copied to clipboard
timeout: fix subprocess is never terminated
Closes #4176.
Follow GNU's timeout behavior, send a signal to the process group to make sure subprocesses are cleaned up, and also send SIGCONT to the child and the whole process group after that.
would it be possible to add a test for this? Thanks
would it be possible to add a test for this? Thanks
Added test_kill_subprocess
test.
I'm not sure why the CI is failing randomly. I have increased the timeout from 2 seconds to 5 seconds. (Everything works fine on my local Ubuntu 22.10)
GNU testsuite comparison:
Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!
GNU testsuite comparison:
Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!
I have increased the timeout from 5 seconds to 10 seconds, and the failing tests are not related to this PR.
GNU testsuite comparison:
Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!
GNU testsuite comparison:
Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!
I checked the GNU test logs and found that this should also fix #4073, which is caused by the split subprocess (filter
) not being killed by the timeout
.
Indeed this reduces the log size from 86MB to just 2MB, that's great! Let's hope the CI becomes a bit more stable as a result.