Skip to content

Commit

Permalink
Experiment: do not stop on sigterm in agoo itself
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairjevans committed Oct 23, 2024
1 parent ad2dd37 commit 64d0c48
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ext/agoo/agoo.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ Init_agoo(void) {
rb_define_module_function(mod, "publish", ragoo_publish, 2);
rb_define_module_function(mod, "unsubscribe", ragoo_unsubscribe, 1);

if (SIG_ERR == signal(SIGINT, sig_handler) ||
SIG_ERR == signal(SIGTERM, sig_handler) ||
SIG_ERR == signal(SIGPIPE, SIG_IGN) ||
// if (SIG_ERR == signal(SIGINT, sig_handler) ||
// SIG_ERR == signal(SIGTERM, sig_handler) ||
// SIG_ERR == signal(SIGPIPE, SIG_IGN) ||

// This causes sleeps and queue pops to return immediately and it can be
// called very frequently on mac OS with multiple threads. Something seems
// to get stuck.
SIG_ERR == signal(SIGVTALRM, SIG_IGN)) {
// // This causes sleeps and queue pops to return immediately and it can be
// // called very frequently on mac OS with multiple threads. Something seems
// // to get stuck.
// SIG_ERR == signal(SIGVTALRM, SIG_IGN)) {

rb_raise(rb_eStandardError, "%s", strerror(errno));
}
// rb_raise(rb_eStandardError, "%s", strerror(errno));
// }
}

0 comments on commit 64d0c48

Please sign in to comment.