Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
go
golang-gvisor
golang-gvisor-copyconsole.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File golang-gvisor-copyconsole.patch of Package golang-gvisor
From ccfc23f028aa78892436fd32a105cfcba247e654 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Wed, 17 Apr 2024 15:37:54 +0100 Subject: [PATCH] Update to newer containerd API: Platform from stdio. The Platfomm interface's CopyConsole function's signature has changed. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- pkg/shim/proc/exec.go | 2 +- pkg/shim/proc/init.go | 2 +- pkg/shim/service_linux.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/shim/proc/exec.go b/pkg/shim/proc/exec.go index da2e21598..8b853e8c9 100644 --- a/pkg/shim/proc/exec.go +++ b/pkg/shim/proc/exec.go @@ -238,7 +238,7 @@ func (e *execProcess) start(ctx context.Context) error { if err != nil { return fmt.Errorf("failed to retrieve console master: %w", err) } - if e.console, err = e.parent.Platform.CopyConsole(ctx, console, e.stdio.Stdin, e.stdio.Stdout, e.stdio.Stderr, &e.wg); err != nil { + if e.console, err = e.parent.Platform.CopyConsole(ctx, console, e.parent.ID(), e.stdio.Stdin, e.stdio.Stdout, e.stdio.Stderr, &e.wg); err != nil { return fmt.Errorf("failed to start console copy: %w", err) } } else if !e.stdio.IsNull() { diff --git a/pkg/shim/proc/init.go b/pkg/shim/proc/init.go index fcdc8e2bc..eb6a3f503 100644 --- a/pkg/shim/proc/init.go +++ b/pkg/shim/proc/init.go @@ -155,7 +155,7 @@ func (p *Init) Create(ctx context.Context, r *CreateConfig) (err error) { if err != nil { return fmt.Errorf("failed to retrieve console master: %w", err) } - console, err = p.Platform.CopyConsole(ctx, console, r.Stdin, r.Stdout, r.Stderr, &p.wg) + console, err = p.Platform.CopyConsole(ctx, console, p.ID(), r.Stdin, r.Stdout, r.Stderr, &p.wg) if err != nil { return fmt.Errorf("failed to start console copy: %w", err) } diff --git a/pkg/shim/service_linux.go b/pkg/shim/service_linux.go index fb2f8b062..52c82ca90 100644 --- a/pkg/shim/service_linux.go +++ b/pkg/shim/service_linux.go @@ -33,7 +33,7 @@ type linuxPlatform struct { epoller *console.Epoller } -func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg *sync.WaitGroup) (console.Console, error) { +func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console, id, stdin, stdout, stderr string, wg *sync.WaitGroup) (console.Console, error) { if p.epoller == nil { return nil, fmt.Errorf("uninitialized epoller") } -- 2.44.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor