@@ -94,6 +94,7 @@ public final class LinuxProcess: Sendable {
9494
9595 private let state : Mutex < State >
9696 private let ioSetup : Stdio
97+ private let native : Bool
9798 private let agent : any VirtualMachineAgent
9899 private let vm : any VirtualMachineInstance
99100 private let ociRuntimePath : String ?
@@ -105,6 +106,7 @@ public final class LinuxProcess: Sendable {
105106 containerID: String ? = nil ,
106107 spec: Spec ,
107108 io: Stdio ,
109+ native: Bool = false ,
108110 ociRuntimePath: String ? ,
109111 agent: any VirtualMachineAgent ,
110112 vm: any VirtualMachineInstance ,
@@ -115,6 +117,7 @@ public final class LinuxProcess: Sendable {
115117 self . owningContainer = containerID
116118 self . state = Mutex < State > ( . init( spec: spec, pid: - 1 , stdio: StdioHandles ( ) ) )
117119 self . ioSetup = io
120+ self . native = native
118121 self . agent = agent
119122 self . ociRuntimePath = ociRuntimePath
120123 self . vm = vm
@@ -240,6 +243,11 @@ extension LinuxProcess {
240243 do {
241244 let spec = self . state. withLock { $0. spec }
242245 var listeners = [ VsockListener? ] ( repeating: nil , count: 3 )
246+
247+ let options = try JSONEncoder ( ) . encode (
248+ CreateProcessOptions ( native: self . native)
249+ )
250+
243251 if let stdin = self . ioSetup. stdin {
244252 listeners [ 0 ] = try self . vm. listen ( stdin. port)
245253 }
@@ -268,7 +276,7 @@ extension LinuxProcess {
268276 stderrPort: self . ioSetup. stderr? . port,
269277 ociRuntimePath: self . ociRuntimePath,
270278 configuration: spec,
271- options: nil
279+ options: options
272280 )
273281
274282 let result = try await t. value
0 commit comments