Description
Previous ID | SR-11699 |
Radar | None |
Original Reporter | Kaiede (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Done |
Attachment: Download
Environment
First hit on Raspberry Pi w/Raspbian Buster - Swift 5.1.1 RELEASE
Official Swift Docker Container for Linux Also Reproduces It:
-
root@5b62e5c1ca9a:/home/PipeTest# swift --version
-
Swift version 5.1.1 (swift-5.1.1-RELEASE)
-
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
Votes | 0 |
Component/s | Foundation |
Labels | Bug |
Assignee | @spevans |
Priority | Medium |
md5: 6577ae0c207d9cfae623bb7c589a5e6e
relates to:
- SR-10639 Connecting two
Process
es withPipe
crashes
Issue Description:
Repro Steps:
-
Unzip PipeTest.zip
-
cd into directory
-
run 'swift test'
Expected:
- All 4 Tests Pass
Actual
-
testProcess_CrashOnLinux will crash on Linux with EBADF
-
Fatal error: POSIX command failed with error: 9 – EBADF: file /home/buildSwiftOnARM/swift-corelibs-foundation/Foundation/Process.swift, line 825
Compare testProcess_CrashOnLinux with testProcess_WorksOnLinux2. These are functionally the same test, but they close the file handle at different times. Apparently closing the handle before process.run() is called will cause the EBADF on Linux, but not macOS.