wisdom@pico.cs.umn.edu (Scott Wisdom) (09/05/90)
I am writting an application which needs to interactively control an ftp session. To do this, I have set up two pipes (an input and an output pipe) and connected them to stdin and stdout of a process running ftp (via popen). When I run any other program in place of ftp, such as ed, it works fine. My program sends commands to ed via the input pipe, and the expected results show up on the output pipe. the ftp program, however, checks to see if it is actualy connected up to a terminal. If not, it will go into batch mode and all interactive control is lost. HOWEVER - if I can somehow get a pty pushed onto the line, I'm pretty sure ftp will stay in interactive mode and my problems will be solved. BUT- I can't find out how to do this. I've looked up everything I can think of in the manuals, consulted various advanced unix programming books, and even searched through usr/include. I can't find a lead anywhere, other than the answer probably has something to do with an ioctl call. I'm out of ideas. HELP! Does anyone have any ideas on how to do this???! Many thanks in advance to those who can help a frustrated programmer who's running out of hair to pull. Scott Wisdom wisdom@heckle.cs.umn.edu