NetBSD-Users archive

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

Re: programming with pty(4)


On Fri, 1 Jun 2012 08:28:49 -0400
Christos Zoulas <> wrote:

> Make sure you close all the file descriptors, or use revoke(2) on the
> pty.

Thanks.  Perhaps I am misunderstanding revoke(2).  It sounds like that
is something I should be doing after I use openpty(3) so that the
initial connection will not be confused with any prior ones.  However,
my problem is not with the first connection; that works fine.  The
problem is after a connection is made with tip(1) and disconnected with
'~^D' then a subsequent connection fails (unless done by root).

If I am to do another revoke(2) call, when should I do that?  How will
I know that the first connection has been disconnected?  If I just
timeout after inactivity will the fact that the slave side of the
pty(4) disappears create problems for clients that were just inactive
but still connected?

Thanks for the help.


Home | Main Index | Thread Index | Old Index