Skip to content

Commit

Permalink
console: lxc_terminal_set_stdfds()
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 548029f commit ae6d391
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lxc/console.c
Expand Up @@ -905,7 +905,7 @@ int lxc_terminal_create(struct lxc_conf *conf)
return -ENODEV;
}

int lxc_console_set_stdfds(int fd)
int lxc_terminal_set_stdfds(int fd)
{
if (fd < 0)
return 0;
Expand Down Expand Up @@ -1122,7 +1122,7 @@ int lxc_login_pty(int fd)
if (ret < 0)
return -1;

ret = lxc_console_set_stdfds(fd);
ret = lxc_terminal_set_stdfds(fd);
if (ret < 0)
return -1;

Expand Down
2 changes: 1 addition & 1 deletion src/lxc/console.h
Expand Up @@ -148,7 +148,7 @@ extern int lxc_console_getfd(struct lxc_container *c, int *ttynum,
* fd is made a duplicate of a specific standard file descriptor iff the
* standard file descriptor refers to a pty.
*/
extern int lxc_console_set_stdfds(int fd);
extern int lxc_terminal_set_stdfds(int fd);

/*
* Handler for events on the stdin fd of the pty. To be registered via the
Expand Down
2 changes: 1 addition & 1 deletion src/lxc/start.c
Expand Up @@ -1205,7 +1205,7 @@ static int do_start(void *data)
if (handler->backgrounded || handler->conf->is_execute == 0)
ret = set_stdfds(handler->conf->console.slave);
else
ret = lxc_console_set_stdfds(handler->conf->console.slave);
ret = lxc_terminal_set_stdfds(handler->conf->console.slave);
if (ret < 0) {
ERROR("Failed to redirect std{in,out,err} to pty file "
"descriptor %d", handler->conf->console.slave);
Expand Down

0 comments on commit ae6d391

Please sign in to comment.