mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	update c/common
Update containers common to the latest HEAD. Some bug fixes in libimage forced us to have a clearer separation between ordinary images and manifest lists. Hence, when looking up manifest lists without recursing into any of their instances, we need to use `LookupManifestList()`. Also account for some other changes in c/common (e.g., the changed order in the security labels). Further vendor the latest HEAD from Buildah which is required to get the bud tests to pass. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
		
							
								
								
									
										67
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										67
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -118,7 +118,7 @@ func (process *Process) Signal(ctx context.Context, options interface{}) (bool, | ||||
| 	process.handleLock.RLock() | ||||
| 	defer process.handleLock.RUnlock() | ||||
|  | ||||
| 	operation := "hcsshim::Process::Signal" | ||||
| 	operation := "hcs::Process::Signal" | ||||
|  | ||||
| 	if process.handle == 0 { | ||||
| 		return false, makeProcessError(process, operation, ErrAlreadyClosed, nil) | ||||
| @ -143,7 +143,7 @@ func (process *Process) Kill(ctx context.Context) (bool, error) { | ||||
| 	process.handleLock.RLock() | ||||
| 	defer process.handleLock.RUnlock() | ||||
|  | ||||
| 	operation := "hcsshim::Process::Kill" | ||||
| 	operation := "hcs::Process::Kill" | ||||
|  | ||||
| 	if process.handle == 0 { | ||||
| 		return false, makeProcessError(process, operation, ErrAlreadyClosed, nil) | ||||
| @ -164,7 +164,7 @@ func (process *Process) Kill(ctx context.Context) (bool, error) { | ||||
| // This MUST be called exactly once per `process.handle` but `Wait` is safe to | ||||
| // call multiple times. | ||||
| func (process *Process) waitBackground() { | ||||
| 	operation := "hcsshim::Process::waitBackground" | ||||
| 	operation := "hcs::Process::waitBackground" | ||||
| 	ctx, span := trace.StartSpan(context.Background(), operation) | ||||
| 	defer span.End() | ||||
| 	span.AddAttributes( | ||||
| @ -229,7 +229,7 @@ func (process *Process) ResizeConsole(ctx context.Context, width, height uint16) | ||||
| 	process.handleLock.RLock() | ||||
| 	defer process.handleLock.RUnlock() | ||||
|  | ||||
| 	operation := "hcsshim::Process::ResizeConsole" | ||||
| 	operation := "hcs::Process::ResizeConsole" | ||||
|  | ||||
| 	if process.handle == 0 { | ||||
| 		return makeProcessError(process, operation, ErrAlreadyClosed, nil) | ||||
| @ -267,7 +267,7 @@ func (process *Process) ExitCode() (int, error) { | ||||
| 		} | ||||
| 		return process.exitCode, nil | ||||
| 	default: | ||||
| 		return -1, makeProcessError(process, "hcsshim::Process::ExitCode", ErrInvalidProcessState, nil) | ||||
| 		return -1, makeProcessError(process, "hcs::Process::ExitCode", ErrInvalidProcessState, nil) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -275,7 +275,7 @@ func (process *Process) ExitCode() (int, error) { | ||||
| // these pipes does not close the underlying pipes. Once returned, these pipes | ||||
| // are the responsibility of the caller to close. | ||||
| func (process *Process) StdioLegacy() (_ io.WriteCloser, _ io.ReadCloser, _ io.ReadCloser, err error) { | ||||
| 	operation := "hcsshim::Process::StdioLegacy" | ||||
| 	operation := "hcs::Process::StdioLegacy" | ||||
| 	ctx, span := trace.StartSpan(context.Background(), operation) | ||||
| 	defer span.End() | ||||
| 	defer func() { oc.SetSpanStatus(span, err) }() | ||||
| @ -327,7 +327,7 @@ func (process *Process) CloseStdin(ctx context.Context) error { | ||||
| 	process.handleLock.RLock() | ||||
| 	defer process.handleLock.RUnlock() | ||||
|  | ||||
| 	operation := "hcsshim::Process::CloseStdin" | ||||
| 	operation := "hcs::Process::CloseStdin" | ||||
|  | ||||
| 	if process.handle == 0 { | ||||
| 		return makeProcessError(process, operation, ErrAlreadyClosed, nil) | ||||
| @ -361,10 +361,59 @@ func (process *Process) CloseStdin(ctx context.Context) error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (process *Process) CloseStdout(ctx context.Context) (err error) { | ||||
| 	ctx, span := trace.StartSpan(ctx, "hcs::Process::CloseStdout") //nolint:ineffassign,staticcheck | ||||
| 	defer span.End() | ||||
| 	defer func() { oc.SetSpanStatus(span, err) }() | ||||
| 	span.AddAttributes( | ||||
| 		trace.StringAttribute("cid", process.SystemID()), | ||||
| 		trace.Int64Attribute("pid", int64(process.processID))) | ||||
|  | ||||
| 	process.handleLock.Lock() | ||||
| 	defer process.handleLock.Unlock() | ||||
|  | ||||
| 	if process.handle == 0 { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	process.stdioLock.Lock() | ||||
| 	defer process.stdioLock.Unlock() | ||||
| 	if process.stdout != nil { | ||||
| 		process.stdout.Close() | ||||
| 		process.stdout = nil | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (process *Process) CloseStderr(ctx context.Context) (err error) { | ||||
| 	ctx, span := trace.StartSpan(ctx, "hcs::Process::CloseStderr") //nolint:ineffassign,staticcheck | ||||
| 	defer span.End() | ||||
| 	defer func() { oc.SetSpanStatus(span, err) }() | ||||
| 	span.AddAttributes( | ||||
| 		trace.StringAttribute("cid", process.SystemID()), | ||||
| 		trace.Int64Attribute("pid", int64(process.processID))) | ||||
|  | ||||
| 	process.handleLock.Lock() | ||||
| 	defer process.handleLock.Unlock() | ||||
|  | ||||
| 	if process.handle == 0 { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	process.stdioLock.Lock() | ||||
| 	defer process.stdioLock.Unlock() | ||||
| 	if process.stderr != nil { | ||||
| 		process.stderr.Close() | ||||
| 		process.stderr = nil | ||||
|  | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // Close cleans up any state associated with the process but does not kill | ||||
| // or wait on it. | ||||
| func (process *Process) Close() (err error) { | ||||
| 	operation := "hcsshim::Process::Close" | ||||
| 	operation := "hcs::Process::Close" | ||||
| 	ctx, span := trace.StartSpan(context.Background(), operation) | ||||
| 	defer span.End() | ||||
| 	defer func() { oc.SetSpanStatus(span, err) }() | ||||
| @ -414,7 +463,7 @@ func (process *Process) Close() (err error) { | ||||
| } | ||||
|  | ||||
| func (process *Process) registerCallback(ctx context.Context) error { | ||||
| 	callbackContext := ¬ifcationWatcherContext{ | ||||
| 	callbackContext := ¬ificationWatcherContext{ | ||||
| 		channels:  newProcessChannels(), | ||||
| 		systemID:  process.SystemID(), | ||||
| 		processID: process.processID, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Valentin Rothberg
					Valentin Rothberg