Skip to content

Commit

Permalink
Merge pull request #3 from albinekcom/improve_readme
Browse files Browse the repository at this point in the history
Improve README
  • Loading branch information
aciidgh authored Jul 20, 2016
2 parents 88680d3 + 78eda54 commit 4f9c5f2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Spawn

* Note: Works on OSX and Linux.
* Note: Works on macOS and Linux.

* Spawn runs new processes using `posix_spawn` and reads output (and stderr stream) on a different thread so the calling thread is never blocked.

# How to use?

Just pass the arguments to execute. For example :
Just pass the arguments to execute. For example:

```swift
import Spawn

do {
let spawn = try Spawn(args: ["/bin/sh", "-c", "ls", "."]) { str in
let spawn = try Spawn(args: ["/bin/sh", "-c", "ls", "."]) { str in
print(str)
}
} catch {
Expand All @@ -30,7 +30,10 @@ import PackageDescription

let package = Package(
name: "MyPackage",
dependencies: [.Package(url: "https://github.com/aciidb0mb3r/Spawn", majorVersion: 0)]

dependencies: [
.Package(url: "https://github.com/aciidb0mb3r/Spawn", majorVersion: 0)
]
)
```

Expand Down

0 comments on commit 4f9c5f2

Please sign in to comment.