From: Christian Brauner Date: Sun, 18 Feb 2018 22:10:04 +0000 (+0100) Subject: tree-wide: remove locking around openpty() X-Git-Tag: lxc-3.0.0.beta1~22^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81084dbd0e03c0be26eae5acc9ff77668f29421b;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 e03a096c1..1ec915191 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -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; diff --git a/src/lxc/console.c b/src/lxc/console.c index 9168cdf9d..a415e6a68 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -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;