Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

SSH2 Compile Errors in upgraded RH 6.2 system



On Wed, 12 Apr 2000, Mike Bilow wrote:

> My guess is that your source code does not understand UNIX98 devpts.

Speaking of which, can someone explain briefly how to make use of these?
>From what I gather, you allocate yourself a pty by opening /dev/ptmx with
a call something like this:

  fd = open("/dev/ptmx", O_RDWR);

and then you can determine the pty that was supposedly allocated to you
using ioctl, a la:

  ioctl( fd, TIOCGPTN, (char *) &pty);

(I'm going from memory, so if either that macro or the call itself is
wrong... whatever).

This apparently does indeed place the number of the next available pty
into the int variable pty (i.e. /dev/pts/8 as in one case where I tried
it).

So my question is, now what?  If I do an lsof and grep on that process, I
see my controlling tty, and I see /dev/ptmx is open, but I don't see
/dev/pts/8 listed as open.  Do I now need to explicitly open this pty and
get a seperate file descriptor?

I happened to notice that the tty-redir program (which can be used in
conjunction with ssh and pppd to achieve a hackish VPN solution) isn't
using Unix98 ptys, and I thought I would convert it as an exercise to
familiarize myself a little bit with programming with ptys.

Even better, if someone can point me to some good documents that cover
this sort of material, that'd be preferable (though I'll take the short
explanation too!)  Surprisingly (to me anyway), the O'Reilly book on Posix
programming that I have doesn't seem to cover Unix98 ptys at all.  At
least, not that I could find.

Thanks

-- 
Derek Martin
System Administrator
Mission Critical Linux
martin at MissionCriticalLinux.com 

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org