View Single Post
  #1031  
Old 13.12.2019, 12:44
Rabelux Rabelux is offline
Ultra Loader
 
Join Date: Oct 2018
Posts: 47
Default

Quote:
You should be able to get it by adding "echo $?" to your command
You mean something like
Code:
callSync("scp", sourceFile, "user@hostname:/path", "; echo $?")
or rather get the echo in a new call like callsync("echo $?")?
The question is what does callSync() return? The first, the last, or the sum of all echos to stdout?

What would be the benefit of using callAsync()? I thought using sync is better as i want to make sure the whole file has been copied.
Reply With Quote