Skip to content

propolis-standalone: don't hang on ctrl-c before console is attached#1058

Merged
luqmana merged 1 commit intomasterfrom
standalone-ctrlc-hang
Feb 12, 2026
Merged

propolis-standalone: don't hang on ctrl-c before console is attached#1058
luqmana merged 1 commit intomasterfrom
standalone-ctrlc-hang

Conversation

@luqmana
Copy link
Contributor

@luqmana luqmana commented Feb 11, 2026

A long standing pet peeve of mine I finally got around to fixing:

Before:

$ pfexec ./target/release/propolis-standalone ~/VMs/testvm.toml
Feb 11 14:05:17.970 INFO Creating VM with 2 vCPUs, 536870912 lowmem, 0 highmem
Feb 11 14:05:18.129 INFO VM created, name: testvm
Feb 11 14:05:18.268 INFO Generating E820 map for guest address space
Feb 11 14:05:18.268 INFO Waiting for a connection to ttya
^CFeb 11 14:05:19.305 INFO Destroying instance...                       # Ctrl-C here
Feb 11 14:05:19.305 INFO Instance event ReqHalt (User("Ctrl+C"))
Feb 11 14:05:19.305 INFO State transition Initialize -> Quiesce
Feb 11 14:05:19.305 INFO State transition Quiesce -> Halt
Feb 11 14:05:19.305 INFO State transition Halt -> Destroy
Feb 11 14:05:19.306 INFO Instance destroyed

# Hangs here until there's a connection made to `ttya`

Feb 11 14:05:25.355 INFO Starting instance...

This is what the other end looks like:

$ sercons ./ttya

 * Connected.  Escape sequence is <Enter>#.

 * EOF on read.

After:

$ pfexec ./target/release/propolis-standalone ~/VMs/testvm.toml
Feb 11 14:13:58.434 INFO Creating VM with 2 vCPUs, 536870912 lowmem, 0 highmem
Feb 11 14:13:58.519 INFO VM created, name: testvm
Feb 11 14:13:58.534 INFO Generating E820 map for guest address space
Feb 11 14:13:58.534 INFO Waiting for a connection to ttya
^CFeb 11 14:13:59.494 INFO Destroying instance...
Feb 11 14:13:59.494 INFO Instance event ReqHalt (User("Ctrl+C"))
Feb 11 14:13:59.494 INFO State transition Initialize -> Quiesce
Feb 11 14:13:59.494 INFO State transition Quiesce -> Halt
Feb 11 14:13:59.518 INFO State transition Halt -> Destroy
Feb 11 14:13:59.518 INFO Instance destroyed

@jordanhendricks
Copy link
Contributor

BLESS YOU

@jclulow
Copy link
Contributor

jclulow commented Feb 12, 2026

See also, I guess: #562

@luqmana luqmana merged commit 51a3cb3 into master Feb 12, 2026
12 checks passed
@luqmana luqmana deleted the standalone-ctrlc-hang branch February 12, 2026 18:11
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.

3 participants