dacr / jassh

High level scala SSH API for easy and fast operations on remote servers.
Apache License 2.0
71 stars 27 forks source link

Exit code of -1 #22

Open georgecj11 opened 7 years ago

georgecj11 commented 7 years ago

I have seen at times the sleep command is returning status as -1(which is the default status). If I re-run the same program, it will work. Also I am connecting to localhost, which means its not a network issue

dacr commented 7 years ago

Could you give me more input ? Because from my quick tests it runs fine :

bash$ sleep 1 ; echo $?
0

And with jassh :

bash$ sbt console
scala> import fr.janalyse.ssh._
scala> import java.io.File
scala> SSH("localhost", "test").execOnceWithStatus("sleep 1")
res0: (String, Int) = ("",0)
scala> SSH("localhost", "test").execOnceWithStatus("sleep 1")
res1: (String, Int) = ("",0)

David.