Skip to content

service: add optional controlling TTY via tty: stanza#488

Merged
troglobit merged 1 commit intofinit-project:masterfrom
Ollie-Gutierrez:ctty-support
Apr 23, 2026
Merged

service: add optional controlling TTY via tty: stanza#488
troglobit merged 1 commit intofinit-project:masterfrom
Ollie-Gutierrez:ctty-support

Conversation

@Ollie-Gutierrez
Copy link
Copy Markdown
Contributor

Adds a tty:<dev> keyword for run/task/service stanzas to give them a controlling terminal. I decided to separate this from the prepare_tty helper as that prepares some extra stuff for getty/login which I don’t think we need here, though I’d be interested what you think regarding that. I also tried to keep compatibility with log:. Everything works in my tests and I’ll look into writing some short documentation if you’re happy with everything!

I based this on a poc by @aanderse, which initially just reused prepare_tty. This also addresses finix-community/finix#53.

Copy link
Copy Markdown
Collaborator

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Some minor comments only, other than that it looks good! 💪 Looking forward to getting this merged, with docs 😊

Comment thread src/service.c
Comment thread src/service.c
@Ollie-Gutierrez
Copy link
Copy Markdown
Contributor Author

I've addressed both your comments, and also added some documentation and a section on the man page. I put the docs in tty.md, but happy to move it elsewhere if you'd prefer or just make it inline. Thankyou so much for your help too!

@aanderse
Copy link
Copy Markdown
Contributor

can you please update the luks example from https://finit-project.github.io/switchroot/?h=switch#example-initramfs-finitconf?

@Ollie-Gutierrez
Copy link
Copy Markdown
Contributor Author

Done, can't believe I forgot that considering it's the main reason for the pr

Copy link
Copy Markdown
Collaborator

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Very nice work on this! As a final touch, please squash the code and doc commits (so we get one for code and one for docs) then we can merge! 😃

@Ollie-Gutierrez
Copy link
Copy Markdown
Contributor Author

Apologies for the wait, all done now 👍

Copy link
Copy Markdown
Collaborator

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Brilliant, nice work!

@troglobit
Copy link
Copy Markdown
Collaborator

Apologies for the wait, all done now 👍

No worries at all, thanks for hanging in there!

@troglobit troglobit merged commit ab66142 into finit-project:master Apr 23, 2026
5 of 6 checks passed
@aanderse
Copy link
Copy Markdown
Contributor

thanks everyone, greatly appreciated!


btw @troglobit ... does this put us at enough changes to justify a new release?

@troglobit
Copy link
Copy Markdown
Collaborator

btw @troglobit ... does this put us at enough changes to justify a new release?

I think so! I'll start preparing and doing some release testing on our systems over the next couple of days.

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