I'm using spawn_async_with_pipes from a c++ program.
I tried to send an "ls" command and everything is correct.
I know this is not exactly a gtkmm question, but I don't know
where to ask for this.
Basically, I want to be able to authenticate to enter an ipod
via ssh and to be able to send commands to the ipod and get
the output, all of it sending commands via ssh.

But when trying to use "ssh" and "[email protected]",
the output is shown in the terminal. I want it to be redirected
to the file descriptors, because I need to feed the program with
the ssh password. I have this code:

        int pid, stdinput, stdoutput, stderror;
        std::vector<std::string> argvproc, envpproc;
        argvproc.push_back("ssh");
        argvproc.push_back("[email protected]");
        

        Glib::spawn_async_with_pipes(Glib::get_current_dir(), argvproc,
envpproc, Glib::SPAWN_SEARCH_PATH,
                                     sigc::slot<void>(),
                                     &pid, &stdinput,
                                     &stdoutput, &stderror);


The output in the terminal is something like this:

[email protected]'s password:
[email protected]'s password:
[email protected]'s password:

It outputs this 3 times. With ls I don't get even output because it is
(correctly) redirected to stdinput. Any help here, please?

I would like to be able to:

wait for ssh to ask the password. Send commands to the ssh process and
get them from the main process.

Thanks in advance.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to