Skip to content

Commit cb3652f

Browse files
committed
---
yaml --- r: 339679 b: refs/heads/rxwei-patch-1 c: 9d22cbb h: refs/heads/master i: 339677: 750e79b 339675: d5250b5 339671: b1a9e85 339663: c07a84f 339647: c79b73f
1 parent 6fa8d48 commit cb3652f

File tree

4 files changed

+4
-41
lines changed

4 files changed

+4
-41
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 69776aac3578a3e3102bd8231c917d7d634c99fb
1018+
refs/heads/rxwei-patch-1: 9d22cbb13ec1ee87384010ff258b9977079914cd
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ public func spawnChild(_ args: [String])
217217
if pid == 0 {
218218
// pid of 0 means we are now in the child process.
219219
// Capture the output before executing the program.
220-
close(childStdout.readFD)
221-
close(childStdin.writeFD)
222-
close(childStderr.readFD)
223-
close(childToParentPipe.readFD)
224220
dup2(childStdout.writeFD, STDOUT_FILENO)
225221
dup2(childStdin.readFD, STDIN_FILENO)
226222
dup2(childStderr.writeFD, STDERR_FILENO)
@@ -265,41 +261,6 @@ public func spawnChild(_ args: [String])
265261

266262
// Close the pipe when we're done writing the error.
267263
close(childToParentPipe.writeFD)
268-
} else {
269-
close(childToParentPipe.writeFD)
270-
271-
// Figure out if the child’s call to execve was successful or not.
272-
var readfds = _stdlib_fd_set()
273-
readfds.set(childToParentPipe.readFD)
274-
var writefds = _stdlib_fd_set()
275-
var errorfds = _stdlib_fd_set()
276-
errorfds.set(childToParentPipe.readFD)
277-
278-
var ret: CInt
279-
repeat {
280-
ret = _stdlib_select(&readfds, &writefds, &errorfds, nil)
281-
} while ret == -1 && errno == EINTR
282-
if ret <= 0 {
283-
fatalError("select() returned an error: \(errno)")
284-
}
285-
286-
if readfds.isset(childToParentPipe.readFD) || errorfds.isset(childToParentPipe.readFD) {
287-
var childErrno: CInt = 0
288-
let readResult: ssize_t = withUnsafeMutablePointer(to: &childErrno) {
289-
return read(childToParentPipe.readFD, $0, MemoryLayout.size(ofValue: $0.pointee))
290-
}
291-
if readResult == 0 {
292-
// We read an EOF indicating that the child's call to execve was successful.
293-
} else if readResult < 0 {
294-
fatalError("read() returned error: \(errno)")
295-
} else {
296-
// We read an error from the child.
297-
print(String(cString: strerror(childErrno)))
298-
preconditionFailure("execve() failed")
299-
}
300-
}
301-
302-
close(childToParentPipe.readFD)
303264
}
304265
#else
305266
var fileActions = _make_posix_spawn_file_actions_t()

branches/rxwei-patch-1/test/Interpreter/mandatory_inlining.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-run-simple-swift
22

3+
// REQUIRES: executable_test
4+
35
func test(reportError: ((String) -> (Void))? = nil) {
46
let reportError = reportError ?? { error in
57
print(error)

branches/rxwei-patch-1/test/Parse/source_locs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ func string_interpolation() {
55
}
66

77
// RUN: %target-swift-frontend -dump-ast %s | %FileCheck %s
8-
// CHECK: (interpolated_string_literal_expr {{.*}} trailing_quote_loc=SOURCE_DIR{{/|\\}}test{{/|\\}}Parse{{/|\\}}source_locs.swift:4:12 {{.*}}
8+
// CHECK: (interpolated_string_literal_expr {{.*}} trailing_quote_loc=SOURCE_DIR/test/Parse/source_locs.swift:4:12 {{.*}}

0 commit comments

Comments
 (0)