Reputation: 307
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.
Upvotes: 0
Views: 121
Reputation: 7507
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.
Upvotes: 1