File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ extension LinuxContainer {
566566 }
567567
568568 // Lets free up the init procs resources, as this includes the open agent conn.
569- try ? await startedState. process. delete ( )
569+ try await startedState. process. delete ( )
570570
571571 try await startedState. vm. stop ( )
572572 state = . stopped
Original file line number Diff line number Diff line change @@ -399,12 +399,16 @@ extension LinuxProcess {
399399 containerID: self . owningContainer
400400 )
401401 } catch {
402- self . logger? . error (
403- " process deletion " ,
404- metadata: [
405- " id " : " \( self . id) " ,
406- " error " : " \( error) " ,
407- ] )
402+ self . state. withLock {
403+ $0. stdinRelay? . cancel ( )
404+ try ? $0. stdio. close ( )
405+ }
406+ try ? await self . agent. close ( )
407+ throw ContainerizationError (
408+ . internalError,
409+ message: " failed to delete process " ,
410+ cause: error,
411+ )
408412 }
409413
410414 do {
@@ -413,12 +417,12 @@ extension LinuxProcess {
413417 try $0. stdio. close ( )
414418 }
415419 } catch {
416- self . logger ? . error (
417- " closing process stdio " ,
418- metadata : [
419- " id " : " \( self . id ) " ,
420- " error " : " \( error) " ,
421- ] )
420+ try ? await self . agent . close ( )
421+ throw ContainerizationError (
422+ . internalError ,
423+ message : " failed to close stdio " ,
424+ cause : error,
425+ )
422426 }
423427
424428 do {
You can’t perform that action at this time.
0 commit comments