Skip to content

Commit

Permalink
Restrict modules/graceful to non-windows build and shim the IsChild m…
Browse files Browse the repository at this point in the history
…arker (#8537)
  • Loading branch information
zeripath authored Oct 16, 2019
1 parent fcb535c commit d4cd4ed
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
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

0 comments on commit d4cd4ed

Please sign in to comment.