Skip to content

Commit

Permalink
console: lxc_terminal_signal_init()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 27, 2018
1 parent 9bafc8c commit dc8c788
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/lxc/console.c
Expand Up @@ -131,7 +131,7 @@ int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
return 0;
}

struct lxc_tty_state *lxc_console_signal_init(int srcfd, int dstfd)
struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd)
{
int ret;
bool istty;
Expand Down Expand Up @@ -556,7 +556,7 @@ static int lxc_console_peer_proxy_alloc(struct lxc_pty *console, int sockfd)
if (lxc_setup_tios(console->peerpty.slave, &oldtermio) < 0)
goto err1;

ts = lxc_console_signal_init(console->peerpty.master, console->master);
ts = lxc_terminal_signal_init(console->peerpty.master, console->master);
if (!ts)
goto err1;

Expand Down Expand Up @@ -670,7 +670,7 @@ static int lxc_console_peer_default(struct lxc_pty *console)
goto on_error1;
}

ts = lxc_console_signal_init(console->peer, console->master);
ts = lxc_terminal_signal_init(console->peer, console->master);
console->tty_state = ts;
if (!ts) {
WARN("Failed to install signal handler");
Expand Down Expand Up @@ -1010,7 +1010,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
if (ret < 0)
TRACE("Process is already group leader");

ts = lxc_console_signal_init(stdinfd, masterfd);
ts = lxc_terminal_signal_init(stdinfd, masterfd);
if (!ts) {
ret = -1;
goto close_fds;
Expand Down
8 changes: 4 additions & 4 deletions src/lxc/console.h
Expand Up @@ -184,7 +184,7 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios);
extern void lxc_terminal_winsz(int srcfd, int dstfd);

/*
* lxc_console_signal_init: install signal handler
* lxc_terminal_signal_init: install signal handler
*
* @srcfd : src for winsz in SIGWINCH handler
* @dstfd : dst for winsz in SIGWINCH handler
Expand All @@ -205,7 +205,7 @@ extern void lxc_terminal_winsz(int srcfd, int dstfd);
*
* This function allocates memory. It is up to the caller to free it.
*/
extern struct lxc_tty_state *lxc_console_signal_init(int srcfd, int dstfd);
extern struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd);

/*
* Handler for signal events. To be registered via the corresponding functions
Expand All @@ -217,10 +217,10 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
/*
* lxc_console_signal_fini: uninstall signal handler
*
* @ts : the lxc_tty_state returned by lxc_console_signal_init
* @ts : the lxc_tty_state returned by lxc_terminal_signal_init
*
* Restore the saved signal handler that was in effect at the time
* lxc_console_signal_init() was called.
* lxc_terminal_signal_init() was called.
*
* Must be called with process_lock held to protect the lxc_ttys list, or
* from a non-threaded context.
Expand Down

0 comments on commit dc8c788

Please sign in to comment.