File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -481,8 +481,9 @@ extension LinuxContainer {
481481 config. interfaces
482482 }
483483
484- /// Create the underlying container's virtual machine
485- /// and set up the runtime environment.
484+ /// Create and start the underlying container's virtual machine
485+ /// and set up the runtime environment. The container's init process
486+ /// is NOT running afterwards.
486487 public func create( ) async throws {
487488 try self . state. withLock { try $0. setCreating ( ) }
488489
@@ -538,7 +539,7 @@ extension LinuxContainer {
538539 }
539540 }
540541
541- /// Start the container container 's initial process.
542+ /// Start the container's initial process.
542543 public func start( ) async throws {
543544 let vm = try self . state. withLock { try $0. setStarting ( ) }
544545
@@ -569,6 +570,7 @@ extension LinuxContainer {
569570 try self . state. withLock { try $0. setStarted ( process: process) }
570571 } catch {
571572 try ? await agent. close ( )
573+ try ? await vm. stop ( )
572574 self . state. withLock { $0. errored ( error: error) }
573575 throw error
574576 }
You can’t perform that action at this time.
0 commit comments