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*

3
  • 4
    Trap that signal and do counting by yourself Commented Jun 1, 2019 at 13:53
  • How to trap it, i can't figure it out ? Commented Jun 1, 2019 at 14:28
  • check man pages for signal(7) and sigaction, set a handler for SIGINT and count inside the handler. Commented Jun 1, 2019 at 18:11