[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to wait on a channel for data with channel_poll()


Hi,

You powershell machine probably doesn't flush the output stream at the
end of your script, that's a common problem with scripts run in
non-interactive mode.

Good thing you found a solution !

Aris

Le 22/05/11 17:22, Qian Zhang a écrit :
> Thanks Oliver, I have found the root cause.
> 
> This is not a libssh issue, it is a Windows Powershell issue (I am
> trying to remotely execute a Windows PowerShell script through libssh).
> The root cause is, when my PowerShell script is done, the process
> "powershell.exe" is still there, not exit, so channel_read() blocks
> there for more details.
> 
> The solution is, when the PowerShell script finish everything, it kill
> itself, then channel_read() can return normally.

References:
How to wait on a channel for data with channel_poll()Qian Zhang <zhq527725@xxxxxxxxx>
Re: How to wait on a channel for data with channel_poll()"Oliver Stöneberg" <oliverst@xxxxxxxxx>
Re: How to wait on a channel for data with channel_poll()Qian Zhang <zhq527725@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org