Skip to content

run_qemu.sh: use the { main; exit "$?"; } trick to allow modifications #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented May 20, 2025

Wrap main around a new compound statement { } to force bash to read it entirely before running it. This allows modifying the script while it's running.

Credits to Simon Tatham
https://hachyderm.io/@simontatham/114511220670677410

Wrap main around a new compound statement { } to force bash to read it
entirely before running it. This allows modifying the script while it's
running.

Credits to Simon Tatham
https://hachyderm.io/@simontatham/114511220670677410

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb marc-hb marked this pull request as ready for review May 20, 2025 18:58
@marc-hb marc-hb requested a review from stellarhopper as a code owner May 20, 2025 18:58
@marc-hb
Copy link
Collaborator Author

marc-hb commented May 20, 2025

Mandatory reference: https://xkcd.com/303/

@marc-hb marc-hb merged commit 097d27c into pmem:main May 20, 2025
2 checks passed
@marc-hb marc-hb deleted the wrapped-main branch May 20, 2025 22:16
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.

2 participants