I have a C++ module whose basic work is to check if a directory exists in the remote machine or not. I am using the system()
call for the same .
ssh user@remote-machine [ -d /remote_dir/test]
This works fine giving the result, but intermittently the test fails (the test directory is always there).
Now what might the reason and how to check this.
- The test succeeds but gets failure reason (
system()
call unreliable). - Might be some network issue between the systems. If yes how to check this?
Thanks in advance.
SKP