[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to run commands under non-interactive shell
- Subject: Re: How to run commands under non-interactive shell
- From: aleksey <joomcod@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 10 Jul 2012 10:58:04 +0300
- To: Huang Yaolong <libssh@xxxxxxxxxx>
Hi, guys. I have unsubscribed from news posting. But your letters always come to me :angry:. Please unsubscribe me again. Thanks.
> |
Hi, all. How can I run a command under non-interactive shell? I don't want the redundant echo output of pty, and all I want is the output from the command I run and maybe I would interrupt this command. By doing the following, the command will not run. Notice that I was using the C++ wrapper: execChannel->requestShell(); const string realCommand = command + "\n"; const int count = execChannel->write(realCommand.c_str(), realCommand.size()); after doing the above, I read from the channel, but it will block there because the command did not run yet. How can I run the command specified? If I request a pty, I can run the command correctly. -- Best regards, Yaolong Huang(Curtis) Briontech China |
--
С уважением,
aleksey mailto:joomcod@xxxxxxxxx
How to run commands under non-interactive shell | Huang Yaolong <airekans@xxxxxxxxx> |