From fb9d7c561665d6be21b086853afae6fe75eefead Mon Sep 17 00:00:00 2001 From: Cristian Andrei Date: Fri, 26 Jun 2026 16:52:57 +0300 Subject: [PATCH] scripts/run: Redirect QEMU stdin to /dev/null to prevent SIGTTIN --- bincompat-c-hello/.scripts/run/qemu.x86_64 | 3 ++- bincompat-java-hello/.scripts/run/qemu.x86_64 | 3 ++- c-fs/.scripts/run/qemu.arm64 | 3 ++- c-fs/.scripts/run/qemu.x86_64 | 3 ++- c-hello/.scripts/run/qemu.arm64 | 3 ++- c-hello/.scripts/run/qemu.x86_64 | 3 ++- c-http/.scripts/run/qemu.arm64 | 3 ++- c-http/.scripts/run/qemu.x86_64 | 3 ++- click/.scripts/run/qemu.arm64 | 3 ++- click/.scripts/run/qemu.x86_64 | 3 ++- cpp-hello/.scripts/run/qemu.arm64 | 3 ++- cpp-hello/.scripts/run/qemu.x86_64 | 3 ++- cpp-http/.scripts/run/qemu.arm64 | 3 ++- cpp-http/.scripts/run/qemu.x86_64 | 3 ++- elfloader-basic/.scripts/run/qemu.x86_64 | 3 ++- elfloader-net/.scripts/run/qemu.x86_64 | 3 ++- nginx/.scripts/run/qemu.arm64 | 3 ++- nginx/.scripts/run/qemu.x86_64 | 3 ++- python3-hello/.scripts/run/qemu.arm64 | 3 ++- python3-hello/.scripts/run/qemu.x86_64 | 3 ++- redis/.scripts/run/qemu.arm64 | 1 + redis/.scripts/run/qemu.x86_64 | 3 ++- sqlite/.scripts/run/qemu.arm64 | 3 ++- sqlite/.scripts/run/qemu.x86_64 | 3 ++- wamr/.scripts/run/qemu.x86_64 | 4 ++-- 25 files changed, 49 insertions(+), 25 deletions(-) diff --git a/bincompat-c-hello/.scripts/run/qemu.x86_64 b/bincompat-c-hello/.scripts/run/qemu.x86_64 index 80a9f4d4..4d56770f 100755 --- a/bincompat-c-hello/.scripts/run/qemu.x86_64 +++ b/bincompat-c-hello/.scripts/run/qemu.x86_64 @@ -19,4 +19,5 @@ qemu-system-x86_64 \ -cpu max \ -append "elfloader_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /hello-c" \ -kernel "$base_kernel" \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/bincompat-java-hello/.scripts/run/qemu.x86_64 b/bincompat-java-hello/.scripts/run/qemu.x86_64 index 53dca85b..7458e511 100755 --- a/bincompat-java-hello/.scripts/run/qemu.x86_64 +++ b/bincompat-java-hello/.scripts/run/qemu.x86_64 @@ -23,4 +23,5 @@ qemu-system-x86_64 \ -cpu max \ -append "java-hello_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /usr/lib/jvm/java-17-openjdk-amd64/bin/java /usr/src/hello" \ -kernel workdir/build/java-hello_qemu-x86_64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/c-fs/.scripts/run/qemu.arm64 b/c-fs/.scripts/run/qemu.arm64 index 55580a65..82f27c05 100755 --- a/c-fs/.scripts/run/qemu.arm64 +++ b/c-fs/.scripts/run/qemu.arm64 @@ -17,4 +17,5 @@ qemu-system-aarch64 \ -cpu max \ -kernel workdir/build/c-fs_qemu-arm64 \ -append "c-fs_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /hello.txt" \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/c-fs/.scripts/run/qemu.x86_64 b/c-fs/.scripts/run/qemu.x86_64 index 17003faf..9fd812ac 100755 --- a/c-fs/.scripts/run/qemu.x86_64 +++ b/c-fs/.scripts/run/qemu.x86_64 @@ -16,4 +16,5 @@ qemu-system-x86_64 \ -cpu max \ -kernel workdir/build/c-fs_qemu-x86_64 \ -append "c-fs_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /hello.txt" \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/c-hello/.scripts/run/qemu.arm64 b/c-hello/.scripts/run/qemu.arm64 index cd26b335..e2a7167c 100755 --- a/c-hello/.scripts/run/qemu.arm64 +++ b/c-hello/.scripts/run/qemu.arm64 @@ -11,4 +11,5 @@ qemu-system-aarch64 \ -machine virt \ -m 8 \ -cpu max \ - -kernel workdir/build/c-hello_qemu-arm64 + -kernel workdir/build/c-hello_qemu-arm64 \ + < /dev/null diff --git a/c-hello/.scripts/run/qemu.x86_64 b/c-hello/.scripts/run/qemu.x86_64 index db8748f2..2038cec4 100755 --- a/c-hello/.scripts/run/qemu.x86_64 +++ b/c-hello/.scripts/run/qemu.x86_64 @@ -10,4 +10,5 @@ qemu-system-x86_64 \ -nographic \ -m 8 \ -cpu max \ - -kernel workdir/build/c-hello_qemu-x86_64 + -kernel workdir/build/c-hello_qemu-x86_64 \ + < /dev/null diff --git a/c-http/.scripts/run/qemu.arm64 b/c-http/.scripts/run/qemu.arm64 index d48497d1..7b6a66c5 100755 --- a/c-http/.scripts/run/qemu.arm64 +++ b/c-http/.scripts/run/qemu.arm64 @@ -26,4 +26,5 @@ sudo qemu-system-aarch64 \ -cpu max \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "c-http netdev.ip=172.44.0.2/24:172.44.0.1::: -- " \ - -kernel workdir/build/c-http_qemu-arm64 + -kernel workdir/build/c-http_qemu-arm64 \ + < /dev/null diff --git a/c-http/.scripts/run/qemu.x86_64 b/c-http/.scripts/run/qemu.x86_64 index aa89d08a..7121dcf2 100755 --- a/c-http/.scripts/run/qemu.x86_64 +++ b/c-http/.scripts/run/qemu.x86_64 @@ -25,4 +25,5 @@ sudo qemu-system-x86_64 \ -cpu max \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "c-http netdev.ip=172.44.0.2/24:172.44.0.1::: -- " \ - -kernel workdir/build/c-http_qemu-x86_64 + -kernel workdir/build/c-http_qemu-x86_64 \ + < /dev/null diff --git a/click/.scripts/run/qemu.arm64 b/click/.scripts/run/qemu.arm64 index f2895667..9fb0e1df 100755 --- a/click/.scripts/run/qemu.arm64 +++ b/click/.scripts/run/qemu.arm64 @@ -19,4 +19,5 @@ sudo qemu-system-aarch64 \ -kernel workdir/build/click_qemu-arm64 \ -initrd helloworld.click \ -machine virt -cpu max \ - -nographic + -nographic \ + < /dev/null diff --git a/click/.scripts/run/qemu.x86_64 b/click/.scripts/run/qemu.x86_64 index d0cec53d..1d65ef49 100755 --- a/click/.scripts/run/qemu.x86_64 +++ b/click/.scripts/run/qemu.x86_64 @@ -17,4 +17,5 @@ sudo qemu-system-x86_64 \ -append "netdev.ipv4_addr=172.44.0.2 netdev.ipv4_gw_addr=172.44.0.1 netdev.ipv4_subnet_mask=255.255.255.0 --" \ -kernel workdir/build/click_qemu-x86_64 \ -initrd helloworld.click \ - -nographic + -nographic \ + < /dev/null diff --git a/cpp-hello/.scripts/run/qemu.arm64 b/cpp-hello/.scripts/run/qemu.arm64 index c7720f30..a9b54539 100755 --- a/cpp-hello/.scripts/run/qemu.arm64 +++ b/cpp-hello/.scripts/run/qemu.arm64 @@ -11,4 +11,5 @@ qemu-system-aarch64 \ -machine virt \ -m 8 \ -cpu max \ - -kernel workdir/build/cpp-hello_qemu-arm64 + -kernel workdir/build/cpp-hello_qemu-arm64 \ + < /dev/null diff --git a/cpp-hello/.scripts/run/qemu.x86_64 b/cpp-hello/.scripts/run/qemu.x86_64 index 5c09404a..000df043 100755 --- a/cpp-hello/.scripts/run/qemu.x86_64 +++ b/cpp-hello/.scripts/run/qemu.x86_64 @@ -10,4 +10,5 @@ qemu-system-x86_64 \ -nographic \ -m 8 \ -cpu max \ - -kernel workdir/build/cpp-hello_qemu-x86_64 + -kernel workdir/build/cpp-hello_qemu-x86_64 \ + < /dev/null diff --git a/cpp-http/.scripts/run/qemu.arm64 b/cpp-http/.scripts/run/qemu.arm64 index 48dfdd73..6e182b5c 100755 --- a/cpp-http/.scripts/run/qemu.arm64 +++ b/cpp-http/.scripts/run/qemu.arm64 @@ -26,4 +26,5 @@ sudo qemu-system-aarch64 \ -cpu max \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "cpp-http netdev.ip=172.44.0.2/24:172.44.0.1::: -- " \ - -kernel workdir/build/cpp-http_qemu-arm64 + -kernel workdir/build/cpp-http_qemu-arm64 \ + < /dev/null diff --git a/cpp-http/.scripts/run/qemu.x86_64 b/cpp-http/.scripts/run/qemu.x86_64 index eae28f7a..66d9d7c0 100755 --- a/cpp-http/.scripts/run/qemu.x86_64 +++ b/cpp-http/.scripts/run/qemu.x86_64 @@ -25,4 +25,5 @@ sudo qemu-system-x86_64 \ -cpu max \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "cpp-http netdev.ip=172.44.0.2/24:172.44.0.1::: -- " \ - -kernel workdir/build/cpp-http_qemu-x86_64 + -kernel workdir/build/cpp-http_qemu-x86_64 \ + < /dev/null diff --git a/elfloader-basic/.scripts/run/qemu.x86_64 b/elfloader-basic/.scripts/run/qemu.x86_64 index 024f7f3a..76ec52a6 100755 --- a/elfloader-basic/.scripts/run/qemu.x86_64 +++ b/elfloader-basic/.scripts/run/qemu.x86_64 @@ -19,4 +19,5 @@ qemu-system-x86_64 \ -cpu max \ -append "elfloader_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /hello-c" \ -kernel workdir/build/elfloader_qemu-x86_64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/elfloader-net/.scripts/run/qemu.x86_64 b/elfloader-net/.scripts/run/qemu.x86_64 index 3d834419..26e8d507 100755 --- a/elfloader-net/.scripts/run/qemu.x86_64 +++ b/elfloader-net/.scripts/run/qemu.x86_64 @@ -33,4 +33,5 @@ sudo qemu-system-x86_64 \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "elfloader_qemu-x86_64 netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /c-server" \ -kernel workdir/build/elfloader_qemu-x86_64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/nginx/.scripts/run/qemu.arm64 b/nginx/.scripts/run/qemu.arm64 index 586735dc..dd17c74b 100755 --- a/nginx/.scripts/run/qemu.arm64 +++ b/nginx/.scripts/run/qemu.arm64 @@ -31,4 +31,5 @@ sudo qemu-system-aarch64 \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "nginx netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- -c /nginx/conf/nginx.conf" \ -kernel workdir/build/nginx_qemu-arm64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/nginx/.scripts/run/qemu.x86_64 b/nginx/.scripts/run/qemu.x86_64 index 096d1412..479c76dd 100755 --- a/nginx/.scripts/run/qemu.x86_64 +++ b/nginx/.scripts/run/qemu.x86_64 @@ -30,4 +30,5 @@ sudo qemu-system-x86_64 \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "nginx netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- -c /nginx/conf/nginx.conf" \ -kernel workdir/build/nginx_qemu-x86_64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/python3-hello/.scripts/run/qemu.arm64 b/python3-hello/.scripts/run/qemu.arm64 index fd1972ae..2582c558 100755 --- a/python3-hello/.scripts/run/qemu.arm64 +++ b/python3-hello/.scripts/run/qemu.arm64 @@ -21,4 +21,5 @@ qemu-system-aarch64 \ -cpu max \ -append "python3-hello_qemu-arm64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] env.vars=[ PYTHONPATH=\"/usr/local/lib/python3.10:/usr/local/lib/python3.10/site-packages\" ] -- /app/hello.py" \ -kernel workdir/build/python3-hello_qemu-arm64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/python3-hello/.scripts/run/qemu.x86_64 b/python3-hello/.scripts/run/qemu.x86_64 index 38a242fa..19d169ef 100755 --- a/python3-hello/.scripts/run/qemu.x86_64 +++ b/python3-hello/.scripts/run/qemu.x86_64 @@ -20,4 +20,5 @@ qemu-system-x86_64 \ -cpu max \ -append "python3-hello_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] env.vars=[ PYTHONPATH=\"/usr/local/lib/python3.10:/usr/local/lib/python3.10/site-packages\" ] -- /app/hello.py" \ -kernel workdir/build/python3-hello_qemu-x86_64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/redis/.scripts/run/qemu.arm64 b/redis/.scripts/run/qemu.arm64 index f8dbc843..278336a0 100755 --- a/redis/.scripts/run/qemu.arm64 +++ b/redis/.scripts/run/qemu.arm64 @@ -32,3 +32,4 @@ sudo qemu-system-aarch64 \ -append "redis netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /redis.conf" \ -kernel workdir/build/redis_qemu-arm64 \ -initrd ./initrd.cpio + < /dev/null diff --git a/redis/.scripts/run/qemu.x86_64 b/redis/.scripts/run/qemu.x86_64 index c5923cd2..1df44dd9 100755 --- a/redis/.scripts/run/qemu.x86_64 +++ b/redis/.scripts/run/qemu.x86_64 @@ -30,4 +30,5 @@ sudo qemu-system-x86_64 \ -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \ -append "redis netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /redis.conf" \ -kernel workdir/build/redis_qemu-x86_64 \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/sqlite/.scripts/run/qemu.arm64 b/sqlite/.scripts/run/qemu.arm64 index 86339ffd..457d8b35 100755 --- a/sqlite/.scripts/run/qemu.arm64 +++ b/sqlite/.scripts/run/qemu.arm64 @@ -16,4 +16,5 @@ qemu-system-aarch64 \ -cpu max \ -kernel workdir/build/sqlite_qemu-arm64 \ -append "sqlite_qemu-arm64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] env.vars=[ \"HOME=/root\" ] -- /chinook.db 'SELECT * FROM Album LIMIT 10'" \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/sqlite/.scripts/run/qemu.x86_64 b/sqlite/.scripts/run/qemu.x86_64 index a3265a40..710a114b 100755 --- a/sqlite/.scripts/run/qemu.x86_64 +++ b/sqlite/.scripts/run/qemu.x86_64 @@ -14,4 +14,5 @@ qemu-system-x86_64 \ -nographic \ -kernel workdir/build/sqlite_qemu-x86_64 \ -append "sqlite_qemu-x86_64 vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] env.vars=[ \"HOME=/root\" ] -- /chinook.db 'SELECT * FROM Album LIMIT 10'" \ - -initrd ./initrd.cpio + -initrd ./initrd.cpio \ + < /dev/null diff --git a/wamr/.scripts/run/qemu.x86_64 b/wamr/.scripts/run/qemu.x86_64 index 5db7049b..cd84013d 100755 --- a/wamr/.scripts/run/qemu.x86_64 +++ b/wamr/.scripts/run/qemu.x86_64 @@ -30,5 +30,5 @@ sudo qemu-system-x86_64 \ -cpu max \ -append "vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- $cmd" \ -kernel "$kernel" \ - -initrd "$PWD"/rootfs.cpio - + -initrd "$PWD"/rootfs.cpio \ + < /dev/null