Skip to content

Commit c132fab

Browse files
committed
Small spacing changes to make PR look pretty
1 parent 6e3d2cd commit c132fab

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

Sources/swsh/ExternalCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class ExternalCommand: Command, CustomStringConvertible {
7373
self.command = command
7474
self.name = command.command
7575
self.process = process
76-
76+
7777
command.spawner.reapAsync(process: process, queue: Result.reaperQueue) { [weak self] exitCode in
7878
self?._exitCode = exitCode
7979
self?._exitSemaphore.signal()

Sources/swsh/FDFileHandle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ fileprivate func close_fd(_ fileDescriptor: FileDescriptor) {
4747
printOSCall("close", fileDescriptor.rawValue)
4848
close(fileDescriptor.rawValue)
4949
#endif
50-
}
50+
}

Sources/swsh/FDWrapperCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ internal class FDWrapperCommand: Command {
5858
func exitCode() -> Int32 { innerResult.exitCode() }
5959
func succeed() throws { try innerResult.succeed() }
6060
func kill(signal: Int32) throws { try innerResult.kill(signal: signal) }
61-
61+
6262
#if compiler(>=5.5) && canImport(_Concurrency)
6363
@available(macOS 10.15, *)
6464
func asyncFinish() async {

Sources/swsh/LinuxSpawn.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import linuxSpawn
77
/// A process spawned with something less nice than `posix_spawn`
88
public struct LinuxSpawn: ProcessSpawner {
99
public func spawn(
10-
command: String,
11-
arguments: [String],
12-
env: [String: String],
13-
fdMap: FDMap,
14-
pathResolve: Bool
10+
command: String,
11+
arguments: [String],
12+
env: [String: String],
13+
fdMap: FDMap,
14+
pathResolve: Bool
1515
) -> SpawnResult {
1616
var cFdMap = [Int32]()
1717
for op in fdMap.createFdOperations() {
@@ -57,9 +57,9 @@ public struct LinuxSpawn: ProcessSpawner {
5757
}
5858

5959
public func reapAsync(
60-
process: ProcessInformation,
61-
queue: DispatchQueue,
62-
callback: @escaping (Int32) -> Void
60+
process: ProcessInformation,
61+
queue: DispatchQueue,
62+
callback: @escaping (Int32) -> Void
6363
) {
6464
Thread.detachNewThread {
6565
let status = spawnWait(process.id)
@@ -70,7 +70,7 @@ public struct LinuxSpawn: ProcessSpawner {
7070
}
7171

7272
public func resume(
73-
process: ProcessInformation
73+
process: ProcessInformation
7474
) throws {
7575
kill(process.id, SIGCONT)
7676
}

Sources/swsh/PosixSpawn.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ private let empty_spawnattrs: posix_spawnattr_t? = nil
99
/// A process spawned with `posix_spawn`
1010
public struct PosixSpawn: ProcessSpawner {
1111
public func spawn(
12-
command: String,
13-
arguments: [String],
14-
env: [String: String],
15-
fdMap: FDMap,
16-
pathResolve: Bool
12+
command: String,
13+
arguments: [String],
14+
env: [String: String],
15+
fdMap: FDMap,
16+
pathResolve: Bool
1717
) -> SpawnResult {
1818
var fileActions = empty_file_actions
1919
posix_spawn_file_actions_init(&fileActions)
@@ -73,9 +73,9 @@ public struct PosixSpawn: ProcessSpawner {
7373
private static func WIFSIGNALED(_ status: Int32) -> Bool { _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0 }
7474

7575
public func reapAsync(
76-
process: ProcessInformation,
77-
queue: DispatchQueue,
78-
callback: @escaping (Int32) -> Void
76+
process: ProcessInformation,
77+
queue: DispatchQueue,
78+
callback: @escaping (Int32) -> Void
7979
) {
8080
let processSource = DispatchSource.makeProcessSource(identifier: process.id, eventMask: .exit, queue: queue)
8181
processSource.setEventHandler { [processSource] in
@@ -93,7 +93,7 @@ public struct PosixSpawn: ProcessSpawner {
9393
}
9494

9595
public func resume(
96-
process: ProcessInformation
96+
process: ProcessInformation
9797
) throws {
9898
kill(process.id, SIGCONT)
9999
}

0 commit comments

Comments
 (0)