Skip to content

Commit f932319

Browse files
authored
Merge pull request #21 from jakepetroules/fix-testrundetached
Fix testRunDetached
2 parents 9e38d01 + 0694ccd commit f932319

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/SubprocessTests/SubprocessTests+Windows.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ extension SubprocessWindowsTests {
790790
// Wait for the process to finish
791791
WaitForSingleObject(processHandle, INFINITE)
792792

793-
let data = try await readFd.readUntilEOF(upToLength: 5)
793+
// Up to 10 characters because Windows process IDs are DWORDs (UInt32), whose max value is 10 digits.
794+
let data = try await readFd.readUntilEOF(upToLength: 10)
794795
let resultPID = try #require(
795796
String(data: data, encoding: .utf8)
796797
).trimmingCharacters(in: .whitespacesAndNewlines)

0 commit comments

Comments
 (0)