Doh! I figured it out - there was an abandoned ftp process from an earlier failed runthrough of the script. I killed the process, and my script runs fine now. Apparently it couldn't create another instance of this process with one still hanging out there, or something like that. Sigh...
Apparently it couldn't create another instance of this process with one still hanging out there
I don't think it even tries. If the application is already running, it will send the commands to that process. That means it was sending commands to (and waiting for a reply from) the non-responsive process. I'm not too sure about this.