Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
c90174af
Commit
c90174af
authored
Sep 04, 2016
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Gitlab::Popen.popen thread-safety issue
Fixes #21842
parent
5fdd92df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/popen.rb
lib/gitlab/popen.rb
+6
-6
No files found.
CHANGELOG
View file @
c90174af
...
@@ -131,6 +131,7 @@ v 8.12.0 (unreleased)
...
@@ -131,6 +131,7 @@ v 8.12.0 (unreleased)
- Remove duplication between project builds and admin builds view !5680 (Katarzyna Kobierska Ula Budziszewska)
- Remove duplication between project builds and admin builds view !5680 (Katarzyna Kobierska Ula Budziszewska)
- Deleting source project with existing fork link will close all related merge requests !6177 (Katarzyna Kobierska Ula Budziszeska)
- Deleting source project with existing fork link will close all related merge requests !6177 (Katarzyna Kobierska Ula Budziszeska)
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Fix Gitlab::Popen.popen thread-safety issue
v 8.11.6 (unreleased)
v 8.11.6 (unreleased)
- Fix an error where we were unable to create a CommitStatus for running state
- Fix an error where we were unable to create a CommitStatus for running state
...
...
lib/gitlab/popen.rb
View file @
c90174af
...
@@ -18,18 +18,18 @@ module Gitlab
...
@@ -18,18 +18,18 @@ module Gitlab
FileUtils
.
mkdir_p
(
path
)
FileUtils
.
mkdir_p
(
path
)
end
end
@
cmd_output
=
""
cmd_output
=
""
@
cmd_status
=
0
cmd_status
=
0
Open3
.
popen3
(
vars
,
*
cmd
,
options
)
do
|
stdin
,
stdout
,
stderr
,
wait_thr
|
Open3
.
popen3
(
vars
,
*
cmd
,
options
)
do
|
stdin
,
stdout
,
stderr
,
wait_thr
|
yield
(
stdin
)
if
block_given?
yield
(
stdin
)
if
block_given?
stdin
.
close
stdin
.
close
@
cmd_output
<<
stdout
.
read
cmd_output
<<
stdout
.
read
@
cmd_output
<<
stderr
.
read
cmd_output
<<
stderr
.
read
@
cmd_status
=
wait_thr
.
value
.
exitstatus
cmd_status
=
wait_thr
.
value
.
exitstatus
end
end
[
@cmd_output
,
@
cmd_status
]
[
cmd_output
,
cmd_status
]
end
end
end
end
end
end
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