Displaying 1 result from an estimated 1 matches for "notify_sigusr1".
Did you mean:
notify_sigusr2
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...eturn;
+ /* All is well, continue to poll SIGUSR1 RP */
+ set_alarm();
+ if (get_var(ups, "SIGUSR1", status, sizeof(status)) == 0) {
+ clear_alarm();
+ if ( ! (strcmp(status,"0") == 0)) { /* See K&R p.53 */
+ /* We have a SIGUSR1 */
+ do_notify(ups, NOTIFY_SIGUSR1);
+ }
+ /* All is well, continue to poll SIGUSR2 RP */
+ set_alarm();
+ if (get_var(ups, "SIGUSR2", status, sizeof(status)) == 0) {
+ clear_alarm();
+ if ( ! (strcmp(status,"0") == 0)) {
+ /* We have a SIGUSR2 */
+ do_notify(ups, NOTIFY_SIGUSR2);
+ }
+...