}
}
-int lxc_console_cb_signal_fd(int fd, uint32_t events, void *cbdata,
- struct lxc_epoll_descr *descr)
+int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
+ struct lxc_epoll_descr *descr)
{
ssize_t ret;
struct signalfd_siginfo siginfo;
}
if (siginfo.ssi_signo == SIGTERM) {
- DEBUG("Received SIGTERM. Detaching from the console");
+ DEBUG("Received SIGTERM. Detaching from the terminal");
return LXC_MAINLOOP_CLOSE;
}
return 0;
ret = lxc_mainloop_add_handler(console->descr, console->tty_state->sigfd,
- lxc_console_cb_signal_fd, console->tty_state);
+ lxc_terminal_signalfd_cb, console->tty_state);
if (ret < 0) {
WARN("Failed to add signal handler to mainloop");
return -1;
if (ts->sigfd != -1) {
ret = lxc_mainloop_add_handler(&descr, ts->sigfd,
- lxc_console_cb_signal_fd, ts);
+ lxc_terminal_signalfd_cb, ts);
if (ret < 0) {
ERROR("Failed to add signal handler to mainloop");
goto close_mainloop;
* we're ready for it. This avoids deadlocks since a signal handler (ie
* lxc_terminal_sigwinch()) would need to take the thread mutex to prevent
* lxc_ttys list corruption, but using the fd we can provide the tty_state
- * needed to the callback (lxc_console_cb_signal_fd()).
+ * needed to the callback (lxc_terminal_signalfd_cb()).
*
* This function allocates memory. It is up to the caller to free it.
*/
* Handler for signal events. To be registered via the corresponding functions
* declared and defined in mainloop.{c,h} or lxc_console_mainloop_add().
*/
-extern int lxc_console_cb_signal_fd(int fd, uint32_t events, void *cbdata,
+extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr);
/*