Ah, a weirdness with sftp. I ran a test like this on my machine:
# begin typing
mkfifo /tmp/test
ftp < /tmp/test
cat > /tmp/test
open ftp.ni.com
cd /incoming
ls
^D
# end typing ^D, is control, D of course
You should see the results as you type the commands to cat (cat keeps the pipe open, until ^D). You should be able to do something similar in LabVIEW with the pipe commands.
As long as you don't close the pipe, then ftp should stay running, even if there is nothing to read in the pipe. FTP shouldn't close the pipe, rather it should wait syncronously until there is something to read.
But when I tried it with sftp (from openssh), it would only work if it did not need to ask me for a password (either due to host based a
uthentication, or having already provided a passphrash). If it needed a password, before it would read from the pipe, it would undo the stdin I specified (with the pipe), and actually read the password from the interactive shell. After correctly entering the password (from the shell that executed sftp, not the pipe), it would continue as normal and accept commands from the pipe.
I hope some of this helps you in the future.