0

I know the basic principles of writing signal processing functions. The simpler the better, the global variables are set in the function body, and the rest of the work is left to the main program to complete, but how does the main program periodically check this global variable?

  • However the author of the code wants to? For linux-specific programs, if there's a `poll()`/`epoll` based main loop, I like using a `signalfd()` descriptor based notification for signals instead of handler functions. Or have the signal handler write to an `eventfd()` descriptor the main loop listens for to become readable.. – Shawn May 27 '22 at 07:40
  • I'm just learning systems programming, so I don't know anything about these signal processing methods you're talking about – GUANGTAO ZENG May 27 '22 at 18:00
  • Their man pages are a good starting point – Shawn May 27 '22 at 19:05

0 Answers0