       let commandLine = try job.commandLine.map{ try resolver.resolve($0) }
       let arguments = [tool] + commandLine
 
-      let process = Process(arguments: arguments)
+      let process = context.processProtocol.init(
+        arguments: arguments, environment: ProcessEnv.vars)
       try process.launch()
       pid = Int(process.processID)
 

    /// Queue for executor delegate.
    let delegateQueue: DispatchQueue = DispatchQueue(label: "org.swift.driver.job-executor-delegate")

    init(argsResolver: ArgsResolver, producerMap: [VirtualPath: Job], executorDelegate: JobExecutorDelegate?) {
      self.producerMap = producerMap
      self.argsResolver = argsResolver
      self.executorDelegate = executorDelegate
    }
  }


  /// The job executor delegate.
  let executorDelegate: JobExecutorDelegate?

  /// The process protocol that will be used during job execution.
  let processProtocol: ProcessProtocol.Type

  public init(
    jobs: [Job],
    resolver: ArgsResolver,
    executorDelegate: JobExecutorDelegate? = nil,
    processProtocol: ProcessProtocol.Type = Process.self
  ) {
    self.jobs = jobs
    self.argsResolver = resolver
    self.executorDelegate = executorDelegate
    self.processProtocol = processProtocol
  }

  /// Build the given output.
