tree-wide: remove locking around openpty()

parent 8f8aefcc
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment