mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
jobs test to detect zombies before running
If there is any zombie process, the jobs.fish test will fail. Add an explicit check to report when this happens.
This commit is contained in:
parent
2a8e104cc8
commit
1fd9debaad
1 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,15 @@
|
||||||
#RUN: %fish %s
|
#RUN: %fish %s
|
||||||
|
|
||||||
|
# Ensure there's no zombies before we start, otherwise the tests will mysteriously fail.
|
||||||
|
set zombies_among_us (ps -o stat | string match 'Z*' | count)
|
||||||
|
[ "$zombies_among_us" -eq "0" ]
|
||||||
|
or begin
|
||||||
|
echo "Found existing zombie processes. Clean up zombies before running this test."
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
echo "All clear of zombies."
|
||||||
|
# CHECK: All clear of zombies.
|
||||||
|
|
||||||
# Verify zombies are not left by disown (#7183, #5342)
|
# Verify zombies are not left by disown (#7183, #5342)
|
||||||
# Do this first to avoid colliding with the other disowned processes below, which may
|
# Do this first to avoid colliding with the other disowned processes below, which may
|
||||||
# still be running at the end of the script
|
# still be running at the end of the script
|
||||||
|
|
Loading…
Reference in a new issue