Skip to content
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

WIP Detach tty #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

WIP Detach tty #302

wants to merge 1 commit into from

Conversation

Ealdwulf
Copy link
Contributor

Before I forget, I think this could make the updater slightly more immune to packages asking interactive questions.
NOT proposing to merge for this rc, we've done enough to the updater already.

This PR:

  • causes the updater to detach from its controlling terminal ( if any) tty to prevent any packages thinking they have interactive input.

Detach from controlling tty
"""
try:
myTTY = os.open("/dev/tty",os.O_RDWR)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be broadly better if queried dynamically? To support docker interactive builds.

kanux@minos:~$ peldins-jessie
Started container: peldins-jessie with command: 'bash'
update-binfmts: warning: qemu-arm already enabled in kernel.
kanux@4f73998cc87b:~/peldins-jessie$ tty
/dev/pts/12

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/dev/tty is a magic file which represents the tty attached to the current process.

Copy link
Contributor

Choose a reason for hiding this comment

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

Enlightning... 👍

@radujipa
Copy link
Contributor

radujipa commented Jul 6, 2018

@Ealdwulf I've manually added your changes on top of the current rc branch since rebasing it was too much of a pain. I've kept a copy of the original branch at detach_from_tty_old.

@tombettany tombettany force-pushed the master branch 2 times, most recently from 7ec798f to 9cbd4a7 Compare August 22, 2018 18:17
@tombettany tombettany force-pushed the master branch 2 times, most recently from d85541f to cc8cf39 Compare November 28, 2018 17:02
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