Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from tomerd/fix/flush
Browse files Browse the repository at this point in the history
flush stderr after printing backtraces
  • Loading branch information
weissi authored Jun 14, 2022
2 parents c085164 + 3bd4485 commit f25620d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Backtrace/Backtrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private let errorCallback: CBacktraceErrorCallback? = {
private func printBacktrace(signal: CInt) {
_ = fputs("Received signal \(signal). Backtrace:\n", stderr)
backtrace_full(state, /* skip */ 0, fullCallback, errorCallback, nil)
fflush(stderr)
}

public enum Backtrace {
Expand Down

0 comments on commit f25620d

Please sign in to comment.