Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ada14a52
Commit
ada14a52
authored
Sep 04, 2015
by
Dr. Stefan Schimanski
Committed by
James DeFelice
Sep 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation of Mesos minion on Mac
parent
47af1a0c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
4 deletions
+67
-4
task.go
contrib/mesos/pkg/minion/tasks/task.go
+1
-4
task_linux.go
contrib/mesos/pkg/minion/tasks/task_linux.go
+28
-0
task_other.go
contrib/mesos/pkg/minion/tasks/task_other.go
+38
-0
No files found.
contrib/mesos/pkg/minion/tasks/task.go
View file @
ada14a52
...
...
@@ -214,10 +214,7 @@ func notStartedTask(t *Task) taskStateFn {
if
len
(
t
.
env
)
>
0
{
cmd
.
Env
=
t
.
env
}
cmd
.
SysProcAttr
=
&
syscall
.
SysProcAttr
{
Setpgid
:
true
,
Pdeathsig
:
syscall
.
SIGKILL
,
// see cmdProcess.Kill
}
cmd
.
SysProcAttr
=
sysProcAttr
()
// last min check for shouldQuit here
select
{
...
...
contrib/mesos/pkg/minion/tasks/task_linux.go
0 → 100644
View file @
ada14a52
/*
Copyright 2015 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
tasks
import
(
"syscall"
)
func
sysProcAttr
()
*
syscall
.
SysProcAttr
{
return
&
syscall
.
SysProcAttr
{
Setpgid
:
true
,
Pdeathsig
:
syscall
.
SIGKILL
,
// see cmdProcess.Kill
}
}
contrib/mesos/pkg/minion/tasks/task_other.go
0 → 100644
View file @
ada14a52
// +build !linux
/*
Copyright 2015 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
tasks
import
(
"syscall"
)
func
sysProcAttr
()
*
syscall
.
SysProcAttr
{
// TODO(jdef)
// Consequence of not having Pdeathdig is that on non-Linux systems,
// if SIGTERM doesn't stop child procs then they may "leak" and be
// reparented 'up the chain' somewhere when the minion process
// terminates. For example, such child procs end up living indefinitely
// as children of the mesos slave process (I think the slave could handle
// this case, but currently doesn't do it very well). Pdeathsig on Linux
// was a fallback/failsafe mechanism implemented to guard against this. I
// don't know if OS X has any syscalls that do something similar.
return
&
syscall
.
SysProcAttr
{
Setpgid
:
true
,
}
}
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