Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • termion termion
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 67
    • Issues 67
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • redox-os
  • termiontermion
  • Merge requests
  • !161

Use stdout to get and set terminal attributes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Michael Bradshaw requested to merge mjbshaw/termion:raw into master May 11, 2019
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 2

The current code uses stdin to get and set terminal attributes. Unfortunately this doesn't work when stdin isn't connected to the TTY (e.g. it's a pipe). For example: some_program | less (in this situation, less's stdin can't be set to raw mode, but its stdout and TTY can be).

This change allows programs to use a raw terminal even if they're taking stdin through a pipe. If stdout is a pipe then this will still fail, though.

Edited May 11, 2019 by Michael Bradshaw
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: raw