Skip to content

Commit

Permalink
Elide main queue check in Linux readpassphrase() implementation (#185)
Browse files Browse the repository at this point in the history
* Elide main queue check in Linux readpassphrase impl
* Update Package.swift
  • Loading branch information
gwynne authored Nov 4, 2023
1 parent 4255ad2 commit f4ef965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/ConsoleKit/Terminal/readpassphrase_linux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Dispatch
/// fatal error to call it off the main thread. This enables us to have the signal recovery handler write to somewhere
/// it can find without risking intervention from the Swift runtime at async-signal time.
internal func linux_readpassphrase(_ prompt: UnsafePointer<Int8>, _ buf: UnsafeMutablePointer<Int8>, _ bufsiz: Int, _ flags: Int32) -> UnsafeMutablePointer<Int8>? {
dispatchPrecondition(condition: .onQueue(.main))
//dispatchPrecondition(condition: .onQueue(.main))

precondition((flags & 0x20/* RPP_STDIN */) == 0, "RPP_STDIN is not supported by this implementation")
precondition((flags & 0x04/* RPP_FORCELOWER */) == 0, "RPP_FORCELOWER is not supported by this implementation")
Expand Down

0 comments on commit f4ef965

Please sign in to comment.