Re: [JSch-users] JSCH .53 return empty strings executing commands on ubuntu
Status: Alpha
Brought to you by:
ymnk
From: Tobia C. <tob...@gr...> - 2016-05-18 10:49:07
|
> but read should block until you get data or you reach EOF... it shouldn't return -1 if there might be anymore data... > as -1 (End Of File) was returned that means that no more data is available. You are probably right. I'm not that familiar with Java I/O streams' contracts. > tried it as it is in the example and i still get the same result... > every once in a while i get nothing back. that is the channel is closed and there is no available stuff to read. You might want to try executing a command like "sleep 1; echo Hello; sleep 1; echo World" just to rule out any race conditions in your code. Otherwise, I'll have to defer to the JSch experts here. Tobia |