These are chat archives for rust-lang/rust

28th
Nov 2016
mchapala
@mchapala
Nov 28 2016 03:40

hey
I am trying to use the std::process::Command lib to ssh to remote instance.

#[test]
fn client_ssh_timeout2() {
    match Command::new("/usr/bin/ssh -i /tmp/.ssh/25.pem ubuntu@ip").spawn() {
        Ok(_) => println!("Able to ssh"),
        Err(e) => println!("{:?}", e)
    };

}

But I am getting the error

Error { repr: Os { code: 2, message: "No such file or directory" } }

Any idea what I might be doing wrong

Dave Hylands
@dhylands
Nov 28 2016 04:11
@mchapala I suspect it's treating the entire string as a program name. I think you need to use just "/us/bin/ssh" and then add the args
mchapala
@mchapala
Nov 28 2016 04:39
Thanks @dhylands. The below code is the correct way to use Command lib
#[test]
fn client_ssh_timeout() {
    match Command::new("/usr/bin/ssh")
        .arg("-i")
        .arg("/tmp/.ssh/25.pem")
        .arg("ubuntu@ip").spawn() {
            Ok(_) => println!("Able to ssh"),
            Err(e) => println!("{:?}", e)
         };
}
Nehal Hasnayeen
@Hasnayeen
Nov 28 2016 07:04
is there any crate for video compression?
Sherzod Mutalov
@shmutalov
Nov 28 2016 07:06
Pavel Meledin
@btbvoy
Nov 28 2016 08:03
Hi everyone, Is there any source which might contain a detailed description of how channels are working under the hood?
Pavel Meledin
@btbvoy
Nov 28 2016 08:11
I'm interested in mechanism how they are implemented. Is it kind of a queue with push/pull model? If so how it handles back pressure and which certain of these models it picks up at certain moment of time while processsing messages form channel
Pavel Meledin
@btbvoy
Nov 28 2016 08:13
😄
well, I'm not yet that strong to understand all underlying things over there, so that's why I asked may be for some article or docs
but anyway thx
Pavel Meledin
@btbvoy
Nov 28 2016 08:20
@Alteous too much unsafe code over there
David Harvey-Macaulay
@alteous
Nov 28 2016 08:24
Pavel Meledin
@btbvoy
Nov 28 2016 08:26
@Alteous nope, thanks for pointing
will check it out
thanks
David Harvey-Macaulay
@alteous
Nov 28 2016 08:27
No problem :)
Nehal Hasnayeen
@Hasnayeen
Nov 28 2016 08:49
any there any video encoder in rust?
Chris Dawes
@cmsd2
Nov 28 2016 22:11
I recently came across the pivot tracing paper from sosp 15. It relies on aop and javassist for code injection at runtime. How close can you get to this in rust?
Brian Anderson
@brson
Nov 28 2016 23:44
@cmsd2 both things are hard and mostly unexplored in rust