John3245
John3245

Reputation: 307

How to remove ^c mark from own shell?

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

Answers (1)

e.dan
e.dan

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

Related Questions