Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
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
nexedi
caddy
Commits
d3e5f9d4
Commit
d3e5f9d4
authored
7 years ago
by
Matt Holt
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1800 from mholt/exitcodes
Distinguishable exit codes
parents
65bc696b
cbb85532
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
sigtrap.go
sigtrap.go
+2
-2
sigtrap_posix.go
sigtrap_posix.go
+1
-1
No files found.
sigtrap.go
View file @
d3e5f9d4
...
...
@@ -33,7 +33,7 @@ func trapSignalsCrossPlatform() {
if
PidFile
!=
""
{
os
.
Remove
(
PidFile
)
}
os
.
Exit
(
1
)
os
.
Exit
(
2
)
}
log
.
Println
(
"[INFO] SIGINT: Shutting down"
)
...
...
@@ -62,7 +62,7 @@ func executeShutdownCallbacks(signame string) (exitCode int) {
for
_
,
err
:=
range
errs
{
log
.
Printf
(
"[ERROR] %s shutdown: %v"
,
signame
,
err
)
}
exitCode
=
1
exitCode
=
4
}
})
return
...
...
This diff is collapsed.
Click to expand it.
sigtrap_posix.go
View file @
d3e5f9d4
...
...
@@ -30,7 +30,7 @@ func trapSignalsPosix() {
err
:=
Stop
()
if
err
!=
nil
{
log
.
Printf
(
"[ERROR] SIGQUIT stop: %v"
,
err
)
exitCode
=
1
exitCode
=
3
}
if
PidFile
!=
""
{
os
.
Remove
(
PidFile
)
...
...
This diff is collapsed.
Click to expand it.
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