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

How to run commands under non-interactive shell

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:
      const string realCommand = command + "\n";
      const int count = execChannel->write(realCommand.c_str(),

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

Re: How to run commands under non-interactive shellaleksey <joomcod@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org