]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tree-wide: remove locking around openpty()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 18 Feb 2018 22:10:04 +0000 (23:10 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 16:59:40 +0000 (17:59 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c
src/lxc/console.c

index 28d27878c6d5b2ef0a5578d5739fff92d59e450a..c7bf596d21f881774a0146517c7396f3f6354ff4 100644 (file)
@@ -797,10 +797,8 @@ int lxc_allocate_ttys(const char *name, struct lxc_conf *conf)
        for (i = 0; i < conf->tty; i++) {
                struct lxc_pty_info *pty_info = &tty_info->pty_info[i];
 
-               process_lock();
                ret = openpty(&pty_info->master, &pty_info->slave,
                              pty_info->name, NULL, NULL);
-               process_unlock();
                if (ret) {
                        SYSERROR("failed to create pty device number %d", i);
                        tty_info->nbtty = i;
index d928122fd2848e508fbb054b9fe5a816af283e89..6cc3aad0871309c67231123291aa281a2db3d1b5 100644 (file)
@@ -603,11 +603,9 @@ int lxc_pty_create(struct lxc_console *console)
 {
        int ret, saved_errno;
 
-       process_lock();
        ret = openpty(&console->master, &console->slave, console->name, NULL,
                      NULL);
        saved_errno = errno;
-       process_unlock();
        if (ret < 0) {
                ERROR("%s - Failed to allocate a pty", strerror(saved_errno));
                return -1;