Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6537729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:39:06+00:00 2026-05-25T10:39:06+00:00

POSIX 2008 says : A program that uses these functions should be written to

  • 0

POSIX 2008 says:

A program that uses these functions should be written to catch all
signals and take other appropriate actions to ensure that when the
program terminates, whether planned or not, the terminal device’s
state is restored to its original state.

about using tcgetattr() and tcsetattr() to change the terminal device’s state. In general, which signals need to be handled and what “other appropriate actions” must be taken? If this cannot be answered in general, which signals/actions are appropriate when using tcgetattr() and tcsetattr() to turn off terminal echo?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:39:06+00:00Added an answer on May 25, 2026 at 10:39 am

    The point of the comment is that tcsetattr will change the properties of the enclosing terminal. Thus, if you write a program that disables terminal echo and that program exits without resetting the value, then it will be disabled for the duration of the session (unless another program explicitly re-enables it).

    The appropriate thing to do is, if you are going to change an attribute, save all of the old values before you change them (and then roll back the changes before exiting). This can be done in a signal handler, which is what the recommendation focuses on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's written in POSIX threads tutorial https://computing.llnl.gov/tutorials/pthreads/ that it is a logical error. my
openat() was added to POSIX in the POSIX.1-2008 revision, and has been supported by
Is there a POSIX function that will give me the size of a directory
I was trying POSIX timers togheter with POSIX signals handling. When I try to
Many standard C and POSIX functions return -1 for error, and 0 on success,
Which operating system platform(s) (other than Windows) lack support for POSIX threads (pthreads)?
I’m working on a Windows port of a POSIX C++ program. The problem is
POSIX uses struct timeval to represent time intervals. struct timeval { time_t tv_sec; unsigned
The POSIX system call putenv states that the allocated memory string cannot be freed
How to implement posix threads in linux c++.The smme program when saved as .c

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.