vm_shell.sh: Remove use of daemonize
Replace with running the 'vm run-microdroid' command in the background.
Bug: 245727626
Test: vm_shell.sh start-microdroid --auto-connect
Change-Id: Ic6ec2b145fe1c121f3b657da314338459f13c211
diff --git a/vm/vm_shell.sh b/vm/vm_shell.sh
index 29cc7da..3db7003 100755
--- a/vm/vm_shell.sh
+++ b/vm/vm_shell.sh
@@ -92,7 +92,8 @@
shift
done
if [[ "${auto_connect}" == true ]]; then
- adb shell /apex/com.android.virt/bin/vm run-microdroid -d "${passthrough_args}"
+ adb shell /apex/com.android.virt/bin/vm run-microdroid "${passthrough_args}" &
+ trap "kill $!" EXIT
sleep 2
handle_connect_cmd
else