We occasionally use a Telnet Shell to run some shell commands on an AIX box. After successfull login, we immediately change the prompt via an export PS1 command sent to the shell. We also set the shell prompt accordingly.
For example, in C# we do this:
shell.Prompt= "$XYZ$";
shell.SendCommand(@"export PS1=""$XYZ$""");
This works fine, as long as the prompt length is pretty short. That is, after executing the above, I can send commands, and get their output, and the shell is able to figure out where the end of each output is, based on the prompt string.
This has worked just fine with a number of shell commands. However, recently we attempted to execute a copy command (e.g. cp somefile1 somefile2), and the command consistently fails unless the prompt is10 characters or less. So, for example ":PROMPTXY:" will work, but ":PROMPTXYZ:" will not. Some other commands that we have tried do not seem to care (e.g. ls -l). The only difference we could see was that the copy command does not normally return any output to the shell.
An error occurs when we attempt to send the copy command to the shell (via shell.SendCommand(...)). The exeception thrown by Rebex says "Unable to process command", which I am guessing means there was a problem synchronizing on the prompt.
Any ideas what is going on here?