Skip to content

Commit

Permalink
wip: fix process-group doc
Browse files Browse the repository at this point in the history
  • Loading branch information
passcod committed Mar 9, 2024
1 parent 86dd1e4 commit 6b87c6e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,15 @@ dbg!(status);

```rust
TokioCommandWrap::new(Command::new("watch").arg("ls"))
.wrap(CreationFlags::NO_WINDOW | CreationFlags::DETACHED)
.wrap(JobObject::new())
.wrap(ProcessGroup::leader())
.spawn()?;
```

Or join a different group instead:

```rust
TokioCommandWrap::new(Command::new("watch").arg("ls"))
.wrap(ProcessGroup::attach_to(pgid))
.spawn()?;
```

Expand Down

0 comments on commit 6b87c6e

Please sign in to comment.