Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict modules/graceful to non-windows build and shim IsChild #8537

Merged
merged 2 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/graceful/cleanup.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down
11 changes: 11 additions & 0 deletions modules/graceful/graceful_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// This code is heavily inspired by the archived gofacebook/gracenet/net.go handler

package graceful

// This file contains shims for windows builds
const IsChild = false
2 changes: 2 additions & 0 deletions modules/graceful/net.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 2 additions & 0 deletions modules/graceful/restart.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 2 additions & 0 deletions modules/graceful/server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 2 additions & 0 deletions modules/graceful/server_hooks.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 2 additions & 0 deletions modules/graceful/server_http.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 2 additions & 0 deletions modules/graceful/server_signals.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Expand Down