What is the preferred way of getting an exit status of a command ? There
seems to be no mechanism to get notified when the exit status is
available. I saw in the JSch exmples sample code that sleeps for 1sec
and checks if channel is closed in an infinte loop but I think there
should be a better way to do this.