0

In normal terminal, If we run command like 'top' and when we pass interrupt signal through ctrl+c, command terminates But in my own shell it also terminate but also print ^c in the terminal. How can I prevent to print ^c. I need system call to do this.

John3245
  • 177
  • 2
  • 13

1 Answers1

1

This should do it: stty -echoctl

Edit (after OP specified that a system call is needed): See man tcsetattr and the non-POSIX ECHOCTL terminal attribute.

e.dan
  • 7,275
  • 1
  • 26
  • 29