diff --git a/src/backend.cmod b/src/backend.cmod index e0a2f13007525ba86914dfb46d0ec7f252c72f83..efd2cb83da190f0b09d6a4cee1362cb6a3b6b355 100644 --- a/src/backend.cmod +++ b/src/backend.cmod @@ -3289,18 +3289,30 @@ PIKECLASS PollDeviceBackend DECLARE_STORAGE - /*! @decl void set_signal_event_callback(int signum, function cb) + /*! @decl optional void set_signal_event_callback(int signum, function cb) + *! + *! Request @[cb] to be called from the backend when the signal + *! @[signum] is received. *! *! @note *! This function is a noop except for the @tt{kqueue@} case. + *! + *! @note + *! Caveat emptor: Unlikely to work. + *! + *! @seealso + *! @[signal()] */ PIKEFUN void set_signal_event_callback(int signum, function cb) + flags ID_OPTIONAL; { int q; #ifdef BACKEND_USES_KQUEUE struct kevent ev[2]; EV_SET(ev, signum, MY_POLLSIGNAL, EV_ADD, 0, 0, 0); q = kevent(THIS->set, ev, 1, NULL, 0, NULL); + + /* FIXME: Shouldn't cb be registered somewhere? */ #endif pop_n_elems(args); }