Sample Header Ad - 728x90

Zombie process using termux

1 vote
1 answer
581 views
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! } } && sleep '
This will create 10 zombie processes. To check about zombie processes, I write:
ruby -e "puts Dir['/proc/**'].select { |x| File.split(x).then { |y| y.to_i.to_s == y } }.then { |a| %).split == ?Z.freeze} } Zombies)> }"
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?
Asked by 15 Volts (181 rep)
Dec 9, 2019, 11:22 AM
Last activity: May 26, 2020, 05:41 PM