Skip to content

Commit 8590a9e

Browse files
committed
Temporarily emit backtraces from child processes to try and see where the SIGILLs are coming from
1 parent 5cf8c07 commit 8590a9e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -871,12 +871,12 @@ extension ExitTest {
871871
}
872872
#endif
873873

874-
if childEnvironment["SWIFT_BACKTRACE"] == nil {
875-
// Disable interactive backtraces unless explicitly enabled to reduce
876-
// the noise level during the exit test.
877-
childEnvironment["SWIFT_BACKTRACE"] = "enable=no"
878-
}
879-
874+
// if childEnvironment["SWIFT_BACKTRACE"] == nil {
875+
// // Disable interactive backtraces unless explicitly enabled to reduce
876+
// // the noise level during the exit test.
877+
// childEnvironment["SWIFT_BACKTRACE"] = "enable=no"
878+
// }
879+
//
880880
// Insert a specific variable that tells the child process which exit test
881881
// to run.
882882
try JSON.withEncoding(of: exitTest.id) { json in
@@ -933,8 +933,8 @@ extension ExitTest {
933933
atPath: childProcessExecutablePath,
934934
arguments: childArguments,
935935
environment: childEnvironment,
936-
standardOutput: stdoutWriteEnd,
937-
standardError: stderrWriteEnd,
936+
// standardOutput: stdoutWriteEnd,
937+
// standardError: stderrWriteEnd,
938938
additionalFileHandles: [backChannelWriteEnd, capturedValuesReadEnd]
939939
)
940940
}

Sources/Testing/ExitTests/SpawnProcess.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ func spawnExecutable(
153153
func inherit(_ fileHandle: borrowing FileHandle?, as standardFD: CInt? = nil) throws {
154154
if fileHandle != nil {
155155
try inherit(fileHandle!, as: standardFD)
156-
} else if let standardFD {
157-
let mode = (standardFD == STDIN_FILENO) ? O_RDONLY : O_WRONLY
158-
_ = posix_spawn_file_actions_addopen(fileActions, standardFD, "/dev/null", mode, 0)
156+
// } else if let standardFD {
157+
// let mode = (standardFD == STDIN_FILENO) ? O_RDONLY : O_WRONLY
158+
// _ = posix_spawn_file_actions_addopen(fileActions, standardFD, "/dev/null", mode, 0)
159159
}
160160
}
161161

0 commit comments

Comments
 (0)