Subject: Re: ptyfs fully working now...
To: Steven M. Bellovin <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 11/11/2004 16:51:29
On Nov 11, 4:42pm, firstname.lastname@example.org ("Steven M. Bellovin") wrote:
-- Subject: Re: ptyfs fully working now...
| In message <I717Av.F3v@tac.nyc.ny.us>, Christos Zoulas writes:
| >In article <email@example.com>,
| >Rui Paulo <firstname.lastname@example.org> wrote:
| >>On Thu, 11 Nov 2004 13:49:38 GMT
| >>email@example.com (Christos Zoulas) wrote:
| >>> I don't understand the question. I just removed all the pty's and rebooted
| >>> with ptyfs mounted. I don't think that you can disable one specifically.
| >>Using the old scheme, I can disable a pty like this:
| >>ttyp1 none network off
| >>Or am I reading ttys(5) erroneously ?
| >"off" means don't run a program on it. It does not mean that you cannot
| >open it and use it. So for pty's "off" means don't run "none" :-)
| I have a slightly different question: I need to allocate a fixed pty
| for accessing the IR port. I have the following in my /etc/rc.local:
| /usr/pkg/bin/irs -Y -c -y /dev/ptyqf -d `/usr/sbin/irdaattach -f tty01`
| jpilot is configured to read /dev/ptyqf. Can I do that with the new
Sure, that will work the same as before. The problem with such
scripts is that what happens when someone is using ptyqf? I'd rather
have a program that opens a pty dynamically and then makes a symbolic
link from it to a known name. When the program exits, it can remove
the symbolic link. It is trivial to change the code to take the
symbolic link destination name instead of the actual pty, and then
use openpty() to allocate a pty dynamically.
So I would write it instead as:
/usr/pkg/bin/irs -Y -c -l /var/run/pilot -d `/usr/sbin/irdaattach -f tty01`
Then you can have jpilot always refer to /var/run/pilot.
Of course this means modifying irs, but that is straight forward.