Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PERE Alexandre
orchestra
Commits
d9ee1e69
Commit
d9ee1e69
authored
Dec 03, 2019
by
Alexandre Pere
Browse files
Corrects bug
parent
0c48e390
Changes
2
Hide whitespace changes
Inline
Side-by-side
liborchestra/src/lib/ssh/agent.sh
View file @
d9ee1e69
...
...
@@ -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
;
...
...
liborchestra/src/lib/ssh/mod.rs
View file @
d9ee1e69
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment