]> 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>
Sun, 18 Feb 2018 22:10:04 +0000 (23:10 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c
src/lxc/console.c

index e03a096c1d6b731f15f110c46b405c1b8547cfac..1ec915191f8f85569e1f4e67bb8ed454db86bb3d 100644 (file)
@@ -948,10 +948,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 9168cdf9d721a3b040705ad94d861e1426168e28..a415e6a68627eb4af242700f9b74be4c236385c6 100644 (file)
@@ -709,11 +709,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;