From: Christian Brauner Date: Sun, 18 Feb 2018 22:10:04 +0000 (+0100) Subject: tree-wide: remove locking around openpty() X-Git-Tag: lxc-2.0.10~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96f0cf3b67a9dd5630204934c1b46bae708191ce;p=thirdparty%2Flxc.git tree-wide: remove locking around openpty() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 28d27878c..c7bf596d2 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -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; diff --git a/src/lxc/console.c b/src/lxc/console.c index d928122fd..6cc3aad08 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -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;