I am trying to control the ftp client from a C program (OS X). I did fork and execve - the process started fine. The problem is that with pipes - I can send a command to the ftp client process and get feedback from it simply (if I send "help \ n", I will return to the help output), but what I never get in the handset is "ftp>". Any ideas?
Ivan
The program can check stdinto see if it is a terminal or a pipe. In your case, the FTP program probably does this (for example, to find out if it can use escape sequences to display progress bars or suggest editing the command line).
stdin
If you really need a hint, you should study the PTYs (pseudo-terminals) that emulate the console.
ftp-, , -, stdin/stdout - - ( , C -). , , . ( , expect, , ).
expect
wild guess: is this not a "ftp>" message written in STDERR?
Source: https://habr.com/ru/post/1734848/More articles:How to download flex swf from a flash drive? - flexУстановите тестовое приложение на BlackBerry - eclipseWinForms Control.BeginInvoke asynchronous callback - c #iPhone: adding a button to scrollview makes a button inaccessible for interaction - objective-cAn alternative way to capture the screen? (C ++, Windows OS) - c ++Why is struct tagName often different from typedef? - cСохранение справки по дате в Solr - javaHow to choose SELECT for the next? - sqlProblems running the program on Debian - cINFO: Added additional JARs: "xalan-2.7.0.jar" - javaAll Articles