>>>>> "Rafal" == Rafal Maszkowski <[EMAIL PROTECTED]> writes:

Rafal> After a break I am trying to run version 1999-01-28 now. All problems except
Rafal> the one with -z option are fixed. I was able to connect lsh to lshd on Solaris.
Rafal> One of he strange problems I've met is ignoring '\n' by tr so I have changed it
Rafal> like
Rafal> -AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | 
uniq | tr -d '\n'`")
Rafal> -AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 
| sort | uniq | tr -d '\n'`")
Rafal> +AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | 
uniq | /usr/xpg4/bin/tr -d '\n'`")
Rafal> +AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 
| sort | uniq | /usr/xpg4/bin/tr -d '\n'`")
Rafal> in configure.in .

Are we using bezerkely pty code under SOlaris? Ewwwwww! Use /dev/ptmx! It's
POSIX, and _much_ better. Stevens Advanced Programming in the Unix
Environment, Sectiom 19.3, is _really_ good reading for this.

Rafal> ioctl(newtty, TIOCSCTTY, NULL) in tty.c fails - looks like there is no
Rafal> TIOCSCTTY on Solaris, at least 2.5.1 . I don't know what to use here instead.
Rafal> I commented out this ioctl so the code compiles but lshd says
Rafal> pty_setctty: Error disconnecting from controlling tty.
Rafal> The commands I am typing after logging in seem to get to the shell after
Rafal> entering another two characters. I don't know if it is related to missing
Rafal> ioctl.

Same here. TIOSCTTY is a bezerkelyism. Just open /dev/ptmx, call grantpt(),
and all unlockpt(). You also may or may not want to push the appropriate
streams modules (ptem, ldterm, ttcompat). Same section of APUE.

Someone should probably implement a POSIX set of pty/tty functions, and
leave the ancient dreck in as a last resort.

Rafal> In this version I discovered snprintf missing (not only vsnprintf) and hacked
Rafal> some ugly workaround just to compile.

2.5.1 only has __snprintf and __vsnprintf. You can either use these
directly, and re-compile for 2.6 or later, or use somebody else's
implementation.

Reply via email to