pijul nest
guest [sign in]

use tokio::process::Command for proxy commands

[?]
Jan 9, 2021, 11:37 AM
Y67GNDVBCXX5V3SL3OAQCU3NX52OR34NXK7ARKHK7EQDGCLVTHTQC

Dependencies

  • [2] 2WEO7OZL Version updates: getting rid of anyhow + moving to Tokio 1.0
  • [3] TFYJ3P2A Version 0.30.8/0.19.4, and solving conflicts
  • [4] 7FRJYUI6 Reboot because of a bad change
  • [5] 634OYCNM Tokio 0.3
  • [6] ELRPPXSG Fixing conflicts

Change contents

  • edit in thrussh-config/src/proxy.rs at line 1
    [3.158277]
    [3.158278]
    use futures::ready;
  • edit in thrussh-config/src/proxy.rs at line 4
    [3.158309][3.158309:158348]()
    use std::io::Read;
    use std::io::Write;
  • replacement in thrussh-config/src/proxy.rs at line 6
    [3.158393][3.158393:158429]()
    use std::process::{Command, Stdio};
    [3.158393]
    [3.158429]
    use std::process::Stdio;
  • edit in thrussh-config/src/proxy.rs at line 10
    [3.158467]
    [3.158467]
    use tokio::process::Command;
  • replacement in thrussh-config/src/proxy.rs at line 15
    [3.158599][3.158599:158631]()
    Child(std::process::Child),
    [3.158599]
    [3.158631]
    Child(tokio::process::Child),
  • replacement in thrussh-config/src/proxy.rs at line 45
    [3.159500][3.316:661]()
    Stream::Child(ref mut c) => {
    match c.stdout.as_mut().unwrap().read(buf.initialize_unfilled()) {
    Ok(n) => {
    buf.advance(n);
    Poll::Ready(Ok(()))
    }
    Err(e) => Poll::Ready(Err(e)),
    }
    }
    [3.159500]
    [3.159591]
    Stream::Child(ref mut c) => Pin::new(c.stdout.as_mut().unwrap()).poll_read(cx, buf),
  • replacement in thrussh-config/src/proxy.rs at line 58
    [3.159888][3.159888:160171]()
    Stream::Child(ref mut c) => match c.stdin.as_mut().unwrap().write(buf) {
    Ok(n) => Poll::Ready(Ok(n)),
    Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => Poll::Pending,
    Err(e) => Poll::Ready(Err(e)),
    },
    [3.159888]
    [3.160171]
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_write(cx, buf),
  • replacement in thrussh-config/src/proxy.rs at line 65
    [3.160381][3.160381:160662]()
    Stream::Child(ref mut c) => match c.stdin.as_mut().unwrap().flush() {
    Ok(_) => Poll::Ready(Ok(())),
    Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => Poll::Pending,
    Err(e) => Poll::Ready(Err(e)),
    },
    [3.160381]
    [3.160662]
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_flush(cx),
  • replacement in thrussh-config/src/proxy.rs at line 76
    [3.160935][3.160935:160967]()
    c.stdin.take();
    [3.160935]
    [3.160967]
    ready!(Pin::new(c.stdin.as_mut().unwrap()).poll_shutdown(cx))?;
    drop(c.stdin.take());
  • replacement in thrussh-config/Cargo.toml at line 15
    [3.165281][2.4716:4787]()
    tokio = { version = "1.0", features = [ "io-util", "net", "macros" ] }
    [3.165281]
    [3.165354]
    tokio = { version = "1.0", features = [ "io-util", "net", "macros", "process" ] }
  • edit in thrussh/src/client/proxy.rs at line 5
    [3.332856][3.332856:332883]()
    use std::process::Command;
  • edit in thrussh/src/client/proxy.rs at line 8
    [3.332961]
    [3.332961]
    use tokio::process::Command;
  • replacement in thrussh/src/client/proxy.rs at line 13
    [3.333093][3.333093:333125]()
    Child(std::process::Child),
    [3.333093]
    [3.333125]
    Child(tokio::process::Child),
  • replacement in thrussh/src/client/proxy.rs at line 36
    [3.333806][3.1390:1599]()
    Stream::Child(ref mut c) => {
    let n = c.stdout.as_mut().unwrap().read(buf.initialize_unfilled())?;
    buf.advance(n);
    Poll::Ready(Ok(()))
    }
    [3.333806]
    [3.333897]
    Stream::Child(ref mut c) => Pin::new(c.stdout.as_mut().unwrap()).poll_read(cx, buf),
  • replacement in thrussh/src/client/proxy.rs at line 49
    [3.334197][3.334197:334288]()
    Stream::Child(ref mut c) => Poll::Ready(c.stdin.as_mut().unwrap().write(buf)),
    [3.334197]
    [3.334288]
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_write(cx, buf),
  • replacement in thrussh/src/client/proxy.rs at line 59
    [3.334536][3.334536:334589]()
    Stream::Child(_) => Poll::Ready(Ok(())),
    [3.334536]
    [3.334589]
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_flush(cx),
  • replacement in thrussh/src/client/proxy.rs at line 69
    [3.334835][3.334835:334888]()
    Stream::Child(_) => Poll::Ready(Ok(())),
    [3.334835]
    [3.334888]
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_shutdown(cx),
  • replacement in thrussh/Cargo.toml at line 51
    [3.427168][2.24284:24390]()
    tokio = { version = "1.0", features = [ "io-util", "rt-multi-thread", "time", "net", "sync", "macros" ] }
    [3.427168]
    [3.427280]
    tokio = { version = "1.0", features = [ "io-util", "rt-multi-thread", "time", "net", "sync", "macros", "process" ] }