Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
orchestra
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PERE Alexandre
orchestra
Commits
d9ee1e69
Commit
d9ee1e69
authored
Dec 03, 2019
by
Alexandre Pere
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrects bug
parent
0c48e390
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
liborchestra/src/lib/ssh/agent.sh
liborchestra/src/lib/ssh/agent.sh
+2
-2
liborchestra/src/lib/ssh/mod.rs
liborchestra/src/lib/ssh/mod.rs
+2
-2
No files found.
liborchestra/src/lib/ssh/agent.sh
View file @
d9ee1e69
...
@@ -37,7 +37,7 @@ rw_run() {
...
@@ -37,7 +37,7 @@ rw_run() {
local
stdin
;
local
stdin
;
# We format the line
# We format the line
if
read
line
;
then
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
# 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.
# lock hold by the command will be released, after the command was executed.
elif
flock
-ns
201
;
then
elif
flock
-ns
201
;
then
...
@@ -53,7 +53,7 @@ rw_run() {
...
@@ -53,7 +53,7 @@ rw_run() {
flock
-s
202
;
flock
-s
202
;
while
true
;
do
while
true
;
do
if
read
line
;
then
if
read
line
;
then
printf
'RUNAWAY_STDERR: %s\n'
$line
;
echo
"RUNAWAY_STDERR:
$line
"
;
elif
flock
-ns
201
;
then
elif
flock
-ns
201
;
then
flock
-u
202
;
flock
-u
202
;
break
;
break
;
...
...
liborchestra/src/lib/ssh/mod.rs
View file @
d9ee1e69
...
@@ -1006,7 +1006,7 @@ async fn perform_pty(channel: &mut ssh2::Channel<'_>,
...
@@ -1006,7 +1006,7 @@ async fn perform_pty(channel: &mut ssh2::Channel<'_>,
await_wouldblock_io!
(
stream
.read_line
(
&
mut
buffer
))
await_wouldblock_io!
(
stream
.read_line
(
&
mut
buffer
))
.map_err
(|
e
|
Error
::
ExecutionFailed
(
format!
(
"Failed to read outputs: {}"
,
e
)))
?
;
.map_err
(|
e
|
Error
::
ExecutionFailed
(
format!
(
"Failed to read outputs: {}"
,
e
)))
?
;
buffer
=
buffer
.replace
(
"
\r\n
"
,
"
\n
"
);
buffer
=
buffer
.replace
(
"
\r\n
"
,
"
\n
"
);
println
!
(
"Reading command output: {:?}"
,
buffer
);
trace
!
(
"Reading command output: {:?}"
,
buffer
);
// We receive an exit code
// We receive an exit code
if
buffer
.starts_with
(
"RUNAWAY_ECODE: "
){
if
buffer
.starts_with
(
"RUNAWAY_ECODE: "
){
trace!
(
"Ecode message detected"
);
trace!
(
"Ecode message detected"
);
...
@@ -1487,7 +1487,7 @@ mod test {
...
@@ -1487,7 +1487,7 @@ mod test {
hostname
:
Some
(
"127.0.0.1"
.to_owned
()),
hostname
:
Some
(
"127.0.0.1"
.to_owned
()),
user
:
Some
(
"apere"
.to_owned
()),
user
:
Some
(
"apere"
.to_owned
()),
port
:
None
,
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
remote
=
RemoteHandle
::
spawn
(
profile
)
.unwrap
();
let
output
=
std
::
process
::
Command
::
new
(
"dd"
)
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