We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bdd9e7 commit 255a395Copy full SHA for 255a395
stdlib/public/libexec/swift-backtrace/main.swift
@@ -563,8 +563,10 @@ Generate a backtrace for the parent process.
563
564
var fd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0o644)
565
var ndx = 1
566
- while fd < 0 && errno == EEXIST {
567
- ndx += 1
+ while fd < 0 && (errno == EEXIST || errno == EINTR) {
+ if errno != EINTR {
568
+ ndx += 1
569
+ }
570
filename = "\(args.outputPath)/\(name)-\(pid)-\(now.tv_sec).\(now.tv_nsec)-\(ndx).log"
571
fd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0o644)
572
}
0 commit comments