Skip to content

scripts/run: Redirect QEMU stdin to /dev/null to prevent SIGTTIN - #108

Open
CristianAndrei1423 wants to merge 2 commits into
unikraft:mainfrom
CristianAndrei1423:main
Open

scripts/run: Redirect QEMU stdin to /dev/null to prevent SIGTTIN#108
CristianAndrei1423 wants to merge 2 commits into
unikraft:mainfrom
CristianAndrei1423:main

Conversation

@CristianAndrei1423

Copy link
Copy Markdown

Bug that is fixed : whenever the testing scripts boots up the QEMU Virtual Machine, it is put in background. Because of that, it is not allowed to read from the terminal, so the kernel sends SIGTTIN and suspends it, making the test fail automatically.

Fix : Just redirect stdin to /dev/null so that QEMU gets EOF instead. The fix was tested with wrapper.sh on nginx.

@vTusharr

vTusharr commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Ah nice will incorporate this

@CristianAndrei1423

Copy link
Copy Markdown
Author

One detail that i need to add is that QEMU vm's read from stdin only when given the -nographic flag. I specifically changed only the scripts that had this flag given.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the per-app QEMU run scripts to prevent backgrounded QEMU processes from being suspended by SIGTTIN when they attempt to read from the controlling terminal, by redirecting stdin to /dev/null.

Changes:

  • Redirect QEMU stdin to /dev/null across multiple .scripts/run/qemu.* scripts.
  • Add line continuations (\) where needed so the stdin redirection applies to the QEMU invocation.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
wamr/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
sqlite/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
sqlite/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
redis/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
redis/.scripts/run/qemu.arm64 Attempts to redirect QEMU stdin to /dev/null (currently not correctly attached to the QEMU command).
python3-hello/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
python3-hello/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
nginx/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
nginx/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
elfloader-net/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
elfloader-basic/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
cpp-http/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
cpp-http/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
cpp-hello/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
cpp-hello/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
click/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
click/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
c-http/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
c-http/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
c-hello/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
c-hello/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
c-fs/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
c-fs/.scripts/run/qemu.arm64 Redirects QEMU stdin to /dev/null.
bincompat-java-hello/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.
bincompat-c-hello/.scripts/run/qemu.x86_64 Redirects QEMU stdin to /dev/null.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread redis/.scripts/run/qemu.arm64 Outdated
@razvand
razvand requested review from AndreiRV1 and vTusharr July 31, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants