I just ran across the mail that started it all - I was trying to figure out how to do the pseudo-tty stuff, and I ended up getting in touch with Sam Lantinga who ended up writing the tcpserver component of WizPort. Go sam!
From: David LjungSubject: How can I attach a tty to a socket file descriptor? Date: 28 Oct 92 19:09:47 GMT To: [email protected] Well, nobody answered this on comp.unix.questions, so maybe I need to ask people a little higher up ;-) Okay - here's my question: I need to hook up a tty (real or fake) to a file descriptor returned from an accept call for sockets on HP-UX. I need to do this so I can run a shell from the accept which can then run vi. I can't currently run vi, because I need to set the term to non canonical mode with no echo. (or is it canonical mode -- which ever mode doesn't wait for \n) Since I don't have a tty, I can't do this. I have looked through man pages, tried the dup2 command, read books, tried ptty 4.0, attempted sifting through the source for tcsh, and even asked my mom; in my attempt to find an answer... Hopefully there is a simple one - the code I use now to run programs from my limited non-tty shell is the following: close(0); close(1); close(2); dup2(ns,0); dup2(ns,1); dup2(ns,2); execvp(command[0],command); Where ns is the fd returned from accept: accept(s,&addr,&addrlen); Hoping for an easy fix.... (but any fix will do ;-) Dave ------------------------------------------------------------------ (__) ---- David Ljung 314 N. Broom St. #3A oo ) Spawning Cow! Productions Madison, WI. 53703 moo. |_/\ (608) 257-COWS [email protected] "The reasonable man adapts himself to the world, the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man." -George Bernard Shaw