Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-static
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-static
Commits
632aae7a
Unverified
Commit
632aae7a
authored
May 20, 2015
by
Owen Jacobson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix race condition around fifo creation for logs.
parent
e8babff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
boot
scripts/boot
+6
-3
No files found.
scripts/boot
View file @
632aae7a
...
...
@@ -17,6 +17,12 @@ rm -f $wait_pipe
mkfifo
$wait_pipe
exec
3<
>
$wait_pipe
# make a second shared pipe; nginx will write logs to this, and the log tail
# process will read from it and write to stdout.
mkdir
-p
logs
rm
-f
logs/access.log
mkfifo
"logs/access.log"
pids
=()
# trap SIGQUIT (ctrl+\ on the console), SIGTERM (when we get killed) and EXIT
...
...
@@ -62,9 +68,6 @@ echo "Starting log redirection..." >&2
(
trap
'echo "logs" >&3;'
EXIT
trap
'kill -TERM $! 2> /dev/null'
TERM
mkdir
-p
logs
rm
-f
logs/access.log
mkfifo
"logs/access.log"
cat
"logs/access.log"
1>&2 &
wait
)
& pids+
=(
$!
)
...
...
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