summaryrefslogtreecommitdiffhomepage
path: root/pkg/shim/v1/proc
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/shim/v1/proc')
-rw-r--r--pkg/shim/v1/proc/init.go2
-rw-r--r--pkg/shim/v1/proc/init_state.go4
-rw-r--r--pkg/shim/v1/proc/types.go1
-rw-r--r--pkg/shim/v1/proc/utils.go18
4 files changed, 3 insertions, 22 deletions
diff --git a/pkg/shim/v1/proc/init.go b/pkg/shim/v1/proc/init.go
index dab3123d6..9fd7d978c 100644
--- a/pkg/shim/v1/proc/init.go
+++ b/pkg/shim/v1/proc/init.go
@@ -397,7 +397,7 @@ func (p *Init) Exec(ctx context.Context, path string, r *ExecConfig) (process.Pr
}
// exec returns a new exec'd process.
-func (p *Init) exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) {
+func (p *Init) exec(path string, r *ExecConfig) (process.Process, error) {
// process exec request
var spec specs.Process
if err := json.Unmarshal(r.Spec.Value, &spec); err != nil {
diff --git a/pkg/shim/v1/proc/init_state.go b/pkg/shim/v1/proc/init_state.go
index 9233ecc85..0065fc385 100644
--- a/pkg/shim/v1/proc/init_state.go
+++ b/pkg/shim/v1/proc/init_state.go
@@ -95,7 +95,7 @@ func (s *createdState) SetExited(status int) {
}
func (s *createdState) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) {
- return s.p.exec(ctx, path, r)
+ return s.p.exec(path, r)
}
type runningState struct {
@@ -137,7 +137,7 @@ func (s *runningState) SetExited(status int) {
}
func (s *runningState) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) {
- return s.p.exec(ctx, path, r)
+ return s.p.exec(path, r)
}
type stoppedState struct {
diff --git a/pkg/shim/v1/proc/types.go b/pkg/shim/v1/proc/types.go
index 2b0df4663..fc182cf5e 100644
--- a/pkg/shim/v1/proc/types.go
+++ b/pkg/shim/v1/proc/types.go
@@ -40,7 +40,6 @@ type CreateConfig struct {
Stdin string
Stdout string
Stderr string
- Options *types.Any
}
// ExecConfig holds exec creation configuration.
diff --git a/pkg/shim/v1/proc/utils.go b/pkg/shim/v1/proc/utils.go
index 716de2f59..7c2c409af 100644
--- a/pkg/shim/v1/proc/utils.go
+++ b/pkg/shim/v1/proc/utils.go
@@ -67,24 +67,6 @@ func getLastRuntimeError(r *runsc.Runsc) (string, error) {
return errMsg, nil
}
-func copyFile(to, from string) error {
- ff, err := os.Open(from)
- if err != nil {
- return err
- }
- defer ff.Close()
- tt, err := os.Create(to)
- if err != nil {
- return err
- }
- defer tt.Close()
-
- p := bufPool.Get().(*[]byte)
- defer bufPool.Put(p)
- _, err = io.CopyBuffer(tt, ff, *p)
- return err
-}
-
func hasNoIO(r *CreateConfig) bool {
return r.Stdin == "" && r.Stdout == "" && r.Stderr == ""
}