Skip to content

Commit 1a2c523

Browse files
committed
Unwrap the UnsafeMutableRawPointers used for current process identifier on Windows
1 parent 0dd4990 commit 1a2c523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Subprocess/PipeConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private func currentProcessIdentifier() -> ProcessIdentifier {
279279
#elseif canImport(Glibc) || canImport(Android) || canImport(Musl)
280280
return .init(value: ProcessInfo.processInfo.processIdentifier, processDescriptor: -1)
281281
#elseif os(Windows)
282-
return .init(value: UInt32(ProcessInfo.processInfo.processIdentifier), processDescriptor: UnsafeMutableRawPointer(bitPattern: 0), threadHandle: UnsafeMutableRawPointer(bitPattern: 0))
282+
return .init(value: UInt32(ProcessInfo.processInfo.processIdentifier), processDescriptor: UnsafeMutableRawPointer(bitPattern: 0)!, threadHandle: UnsafeMutableRawPointer(bitPattern: 0)!)
283283
#endif
284284
}
285285

0 commit comments

Comments
 (0)