Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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
iv
gitlab-workhorse
Commits
8cb3a69a
Commit
8cb3a69a
authored
Jan 08, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent archive zombies
Episode V: The Archive Zombies Strike Back
parent
607825c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
archive.go
archive.go
+3
-1
No files found.
archive.go
View file @
8cb3a69a
...
...
@@ -14,6 +14,7 @@ import (
"os/exec"
"path"
"path/filepath"
"syscall"
"time"
)
...
...
@@ -79,6 +80,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
stdout
=
archiveStdout
}
else
{
compressCmd
.
Stdin
=
archiveStdout
compressCmd
.
SysProcAttr
=
&
syscall
.
SysProcAttr
{
Setpgid
:
true
}
stdout
,
err
=
compressCmd
.
StdoutPipe
()
if
err
!=
nil
{
...
...
@@ -91,7 +93,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
fail500
(
w
,
fmt
.
Errorf
(
"handleGetArchive: start %v: %v"
,
compressCmd
.
Args
,
err
))
return
}
defer
c
ompressCmd
.
Wait
(
)
defer
c
leanUpProcessGroup
(
compressCmd
)
archiveStdout
.
Close
()
}
...
...
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