Zombie process using termux I am testing one of my application on android's (Android version 7.0) termux terminal emulator.
I want to spawn some zombie processes.

On GNU/Linux, if I open a terminal emulator and write:

ruby -e '10.times { fork { exit! } } &amp;&amp; sleep '


This will create 10 zombie processes. To check about zombie processes, I write:

ruby -e "puts Dir['/proc/**'].select { |x| File.split(x)[1].then { |y| y.to_i.to_s == y } }.then { |a| %&lt;Active Processes: #{a.size} (#{a.count { |x| IO.readlines(%&lt;#{x}/status&gt;)[1].split[1] == ?Z.freeze} } Zombies)&gt; }"


Which outputs in the format:

Active Processes: 189 (10 Zombies)


But on Termux, I can't create zombie processes. When I am forking a process, the process count doesn't increase (as reported by htop and the ruby program). Even if I try to spawn processes, it won't spawn any. I have total 11 processes showing on Termux!

What's so different about android? Is there any way to test my application using termux? Or are there any other applications that will allow me to do such stuff?
I just created 100 zombie processes on Termux using:

for n in {1..100}; do (sleep 1 &amp; exec sleep 10) &amp; done


and they do exist for 10 seconds as expected, then reaped by init. To see zombie processes: 

~$ ps axo stat,ppid,pid,cmd | grep ^Z


Or just to take count use grep -c ^Z.