Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Can you briefly give me an example for second way ? Commented Jun 1, 2019 at 21:06
  • @AlbionShala You never said what programming language you're using. And anyway programming is off-topic here when it goes beyond simple scripting. But a web search with the name of your programming language and "signal handler" and "tutorial" should give you examples. Commented Jun 1, 2019 at 21:14
  • Actually yes i mentioned that i am using C in Linux but it was editted, anyhow thanks a lot, i really appreciate it Commented Jun 1, 2019 at 21:17
  • IGNBRK has nothing to do with Ctrl-C being translated to SIGINT. It's ISIG in c_lflag who is controlling that (also c_cc[VINTR] can be set to 0 to disable it, or to another char). stty -intr is not a valid command. A VINTR/Ctrl-C won't send a signal to the "foreground process", but to the foreground process group (job), ie. when running a|b|c and pressing ^C, a signal will be sent to the a, b and c processes. Commented Jun 1, 2019 at 21:53
  • @mosvy Thanks, I hadn't done that in a while and I should have spent more than 5s re-reading the man page. Regarding process groups, see footnote 2. Commented Jun 1, 2019 at 22:04