screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-privileged user can only connect to /dev/pts/X once?!


From: Joe Yeung
Subject: Re: Non-privileged user can only connect to /dev/pts/X once?!
Date: Fri, 5 Jun 2020 14:32:50 -0700


The open() call  returned #EBUSY 16 /* Device or resource busy */
But I don't see it anything occupying it with "sudo lsof"
I see it only when I attach it with screen (or sudo screen to be precise).

I also looked into strace, but I don't see anything difference between the succeeded first connection and the failed subsequent connection.
At this point, I think I am stuck. :-(

thanks,
Joe.



On Fri, Jun 5, 2020 at 1:05 AM Marcin Cieslak <saper@saper.info> wrote:
On Thu, 4 Jun 2020, Joe Yeung wrote:

> Thanks for your response.
> I am a bit busy today and wasn’t able collect the errno from the failed open() call.

I think screen prints that out too - in my case screen was saying Permission denied as well.

> My system is running Yocto with screen 4.8 but this issue is also observable on Ubuntu.
>
> In your case where the pts jumps from 3 to 4, how did you find out it had gone to 4 in the first place?
> One of my challenges is to find out what pts qemu uses when I spun up the VM. Fortunately it is displayed on the command line. If it is to jump around like your set up, that would be painful because at any instance of time, you wouldn’t know which pts to use.

I just did ls /dev/pts and observed changes there (FreeBSD has its own devfs probably similar to
the Linux one). It was interesting to see 0 1 2 3 listed and then 0 1 2 4 and then back to 0 1 2 3
and so forth...

Intestesting note in the pty(4) manpage:

BUGS
      Unlike previous implementations, the master and slave device nodes are
      destroyed when the PTY becomes unused.  A call to stat(2) on a
      nonexistent master device will already cause a new master device node to
      be created.  The master device can only be destroyed by opening and
      closing it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]