Commit d9ee1e69 authored by Alexandre Pere's avatar Alexandre Pere

Corrects bug

parent 0c48e390
......@@ -37,7 +37,7 @@ rw_run() {
local stdin;
# We format the line
if read line ; then
printf 'RUNAWAY_STDOUT: %s\n' $line ;
echo "RUNAWAY_STDOUT: $line" ;
# We try to acquire a shared lock on the way_in_lock. This can only happen when the exclusive
# lock hold by the command will be released, after the command was executed.
elif flock -ns 201; then
......@@ -53,7 +53,7 @@ rw_run() {
flock -s 202;
while true; do
if read line ; then
printf 'RUNAWAY_STDERR: %s\n' $line ;
echo "RUNAWAY_STDERR: $line" ;
elif flock -ns 201; then
flock -u 202;
break;
......
......@@ -1006,7 +1006,7 @@ async fn perform_pty(channel: &mut ssh2::Channel<'_>,
await_wouldblock_io!(stream.read_line(&mut buffer))
.map_err(|e| Error::ExecutionFailed(format!("Failed to read outputs: {}", e)))?;
buffer = buffer.replace("\r\n", "\n");
println!("Reading command output: {:?}", buffer);
trace!("Reading command output: {:?}", buffer);
// We receive an exit code
if buffer.starts_with("RUNAWAY_ECODE: "){
trace!("Ecode message detected");
......@@ -1487,7 +1487,7 @@ mod test {
hostname: Some("127.0.0.1".to_owned()),
user: Some("apere".to_owned()),
port: None,
proxycommand: Some("ssh -A -l apere localhost -W localhost:22".to_owned()),
proxycommand: Some("ssh -A -l apere localhost -W localhost:22".to_owned())
};
let remote = RemoteHandle::spawn(profile).unwrap();
let output = std::process::Command::new("dd")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment