mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Backtracing] Fix a couple of Linux specific issues.
Linux gives the main thread a name based on the process name, and also we need to tolerate an extra slash on the `<compiler-generated>` filename for some reason. rdar://121430255
This commit is contained in:
@@ -606,8 +606,8 @@ Generate a backtrace for the parent process.
|
||||
while fd < 0 && (errno == EEXIST || errno == EINTR) {
|
||||
if errno != EINTR {
|
||||
ndx += 1
|
||||
filename = "\(args.outputPath)/\(name)-\(pid)-\(now.tv_sec).\(now.tv_nsec)-\(ndx).\(ext)"
|
||||
}
|
||||
filename = "\(args.outputPath)/\(name)-\(pid)-\(now.tv_sec).\(now.tv_nsec)-\(ndx).\(ext)"
|
||||
fd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0o644)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user