@@ -283,38 +283,41 @@ extension Subprocess.Configuration {
283283internal func monitorProcessTermination(
284284 forProcessWithIdentifier pid: Subprocess . ProcessIdentifier
285285) async -> Subprocess . TerminationStatus {
286- return await withCheckedContinuation { continuation in
287- let source = DispatchSource . makeProcessSource (
288- identifier: pid. value,
289- eventMask: [ . exit, . signal]
290- )
291- source. setEventHandler {
292- source. cancel ( )
293- var status : Int32 = - 1
294- waitpid ( pid. value, & status, 0 )
295- if _was_process_exited ( status) != 0 {
296- continuation. resume ( returning: . exited( _get_exit_code ( status) ) )
297- return
298- }
299- if _was_process_signaled ( status) != 0 {
300- continuation. resume ( returning: . unhandledException( _get_signal_code ( status) ) )
301- return
302- }
303- fatalError ( " Unexpected exit status type: \( status) " )
304- }
305- source. resume ( )
306- }
286+ // FIXME: makeProcessSource seems to not be available, disable for now as we don't use this API
287+ fatalError ( " Not implemented. Missing makeProcessSource " )
288+ // return await withCheckedContinuation { continuation in
289+ // let source = DispatchSource.makeProcessSource(
290+ // identifier: pid.value,
291+ // eventMask: [.exit, .signal]
292+ // )
293+ // source.setEventHandler {
294+ // source.cancel()
295+ // var status: Int32 = -1
296+ // waitpid(pid.value, &status, 0)
297+ // if _was_process_exited(status) != 0 {
298+ // continuation.resume(returning: .exited(_get_exit_code(status)))
299+ // return
300+ // }
301+ // if _was_process_signaled(status) != 0 {
302+ // continuation.resume(returning: .unhandledException(_get_signal_code(status)))
303+ // return
304+ // }
305+ // fatalError("Unexpected exit status type: \(status)")
306+ // }
307+ // source.resume()
308+ // }
307309}
308310
309311// MARK: - Read Buffer Size
310312extension Subprocess {
311313 @inline ( __always)
312314 internal static var readBufferSize : Int {
313- #if canImport(Darwin)
315+ // FIXME: Platform is not available, not a bug issue, just ignore for now
316+ // #if canImport(Darwin)
314317 return 16384
315- #else
316- return Platform . pageSize
317- #endif // canImport(Darwin)
318+ // #else
319+ // return Platform.pageSize
320+ // #endif // canImport(Darwin)
318321 }
319322}
320323
0 commit comments