Skip to content

run timeout in the foreground so it can be killed#16

Merged
tpimh merged 2 commits into
masterfrom
trap2
May 13, 2020
Merged

run timeout in the foreground so it can be killed#16
tpimh merged 2 commits into
masterfrom
trap2

Conversation

@nickdesaulniers

@nickdesaulniers nickdesaulniers commented May 13, 2020

Copy link
Copy Markdown
Member

When a kernel is hung, we currently have to wait the timeout to exit,
(or ctrl+z; pkill timeout; fg). For complicated reasons, running timeout
from a shell script won't forward signals to timeout.

Adding --foreground is the simplest option for this to work, via:
https://unix.stackexchange.com/a/233685/388381

See other answers in that thread for why this is the case.

When a kernel is hung, we currently have to wait the timeout to exit,
(or ctrl+z, pkill timeout).  For complicated reasons, running timeout
from a shell script won't forward signals to timeout.

Adding --foreground is the simplest option for this to work, via:
https://unix.stackexchange.com/a/233685/388381

See other answers in that thread for *why* this is the case.

@nathanchance nathanchance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's nifty.

The second commit is technically unnecessary, no? I think you meant "don't run qemu with a timeout when using gdb", which is already the case since --gdb implies --interactive.

I don't particularly care though, it's a micro-optimization to just avoid checking ${INTERACTIVE} until after we have checked ${GDB}.

@tpimh tpimh merged commit dcb8b98 into master May 13, 2020
@tpimh tpimh deleted the trap2 branch May 13, 2020 20:59
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