mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Get rid of exec.cmd struct and setuid file
This commit is contained in:
@@ -70,7 +70,7 @@ type Executor interface {
|
||||
|
||||
// Command provides access the underlying Cmd struct in case the Executor
|
||||
// interface doesn't expose the functionality you need.
|
||||
Command() *cmd
|
||||
Command() *exec.Cmd
|
||||
}
|
||||
|
||||
// Command is a mirror of exec.Command that returns a platform-specific Executor
|
||||
@@ -100,17 +100,3 @@ func OpenId(id string) (Executor, error) {
|
||||
}
|
||||
return executor, nil
|
||||
}
|
||||
|
||||
// Cmd is an extension of exec.Cmd that incorporates functionality for
|
||||
// re-attaching to processes, dropping priviledges, etc., based on platform-
|
||||
// specific implementations.
|
||||
type cmd struct {
|
||||
exec.Cmd
|
||||
|
||||
// Resources is used to limit CPU and RAM used by the process, by way of
|
||||
// cgroups or a similar mechanism.
|
||||
Resources structs.Resources
|
||||
|
||||
// RunAs may be a username or Uid. The implementation will decide how to use it.
|
||||
RunAs string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user