2

SIGINT is used to handle Ctrl+c but there is no signal for Ctrl+n and Ctrl+d, how can I handle these? Any idea?

I have a link list in my program and I have to perform some link list operations in these signal handlers. I just want to detect Ctrl+d and Ctrl+n in the normal flow of program.

kdopen
  • 8,032
  • 7
  • 44
  • 52
Uzair Farooq
  • 917
  • 3
  • 15
  • 25
  • http://stackoverflow.com/q/1516414/390913 – perreal Nov 26 '11 at 18:43
  • 4
    CTRL-D is EOF (e.g. when reading from stdin, so typically does not cause a signal). What do you expect CTRL+n to do ? Could you tell us about what you want to achieve ? – Andre Holzner Nov 26 '11 at 18:43
  • 5
    You may be looking for [ncurses](http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/). – zwol Nov 26 '11 at 19:04
  • 1
    Does this answer your question? [How to capture Control+D signal?](https://stackoverflow.com/questions/1516122/how-to-capture-controld-signal) – Werner Henze Feb 21 '20 at 09:15

0 Answers0