Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-11408] Foundation.Process: can invoke run() again without error #3290

Closed
weissi opened this issue Sep 2, 2019 · 3 comments
Closed

[SR-11408] Foundation.Process: can invoke run() again without error #3290

weissi opened this issue Sep 2, 2019 · 3 comments

Comments

@weissi
Copy link
Member

weissi commented Sep 2, 2019

Previous ID SR-11408
Radar rdar://problem/54952347
Original Reporter @weissi
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, backport-candidate
Assignee @spevans
Priority Medium

md5: 2a5c53d5eaaf88de193a0076bd76fffb

Issue Description:

the following program should print OK:

import Foundation

let p = Process()
#if os(Linux)
p.executableURL = URL(fileURLWithPath: "/bin/true")
#else
p.executableURL = URL(fileURLWithPath: "/usr/bin/true")
#endif

try! p.run()
p.waitUntilExit()

do {
    try p.run()
    print("ERROR: run ran again!")
} catch {
    print("OK")
}
p.waitUntilExit()

because the second call to run must fail. But it doesn't on Linux (5.0.3):

$ swift repro.swift # Darwin
OK
$ jw-docker-swift-5.0 swift repro.swift # Linux
ERROR: run ran again!
@weissi
Copy link
Member Author

weissi commented Sep 2, 2019

@swift-ci create

@spevans
Copy link
Collaborator

spevans commented Sep 30, 2019

#2526

@spevans
Copy link
Collaborator

spevans commented Nov 14, 2019

Fix in swift-DEVELOPMENT-SNAPSHOT-2019-11-12-a-ubuntu18.04

$ ~/swift-DEVELOPMENT-SNAPSHOT-2019-11-12-a-ubuntu18.04/usr/bin/swift sr-11408.swift 
OK
 

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants