Commit Graph

91 Commits

Author SHA1 Message Date
John Nunley 513b9262d7
v1.8.1
Signed-off-by: John Nunley <dev@notgull.net>
2023-10-07 18:48:22 -07:00
John Nunley ce7ded77e8
bugfix: Bump async-signal to v0.2.3
Extracted from #54, should fix #55

Signed-off-by: John Nunley <dev@notgull.net>
2023-10-05 19:02:10 -07:00
John Nunley 78342ab1db
v1.8.0
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-25 09:58:59 -07:00
John Nunley 52a693e4dd
m: Centralize all global state into a single structure
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-10 16:00:56 -07:00
John Nunley 5e8e0b7c7b
Upgrade to event-listener v3.0.0 (#43)
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-10 12:57:24 -07:00
Taiki Endo ac1c639e3e Update actions/checkout action to v4 2023-09-10 18:19:38 +09:00
John Nunley 07165c72f5
Add smol-rs logo (#48) 2023-07-17 14:41:47 +09:00
dependabot[bot] 1715616859
m: Update rustix requirement from 0.37 to 0.38
Updates the requirements on [rustix](https://github.com/bytecodealliance/rustix) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.0...v0.38.2)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-02 19:05:21 -07:00
John Nunley d45d6f1094
Use async-signal instead of signal-hook (#42) 2023-06-11 11:21:40 -07:00
Taiki Endo d9d97d0299 Fix clippy::needless_borrow warning
```
error: the borrowed expression implements the required traits
   --> src/lib.rs:212:57
    |
212 |                     signal_hook::iterator::Signals::new(&[signal_hook::consts::SIGCHLD])
    |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[signal_hook::consts::SIGCHLD]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`

error: the borrowed expression implements the required traits
  --> tests/std.rs:14:38
   |
14 |             Command::new("cmd").args(&["/C", "exit 0"]).spawn()
   |                                      ^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "exit 0"]`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`

error: the borrowed expression implements the required traits
  --> tests/std.rs:35:38
   |
35 |             Command::new("cmd").args(&["/C", "exit 1"]).spawn()
   |                                      ^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "exit 1"]`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
  --> tests/std.rs:87:22
   |
87 |             cmd.args(&["/C", "echo foobar"]).stdout(Stdio::piped());
   |                      ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "echo foobar"]`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:145:23
    |
145 |                 .args(&["/C", "exit 1"])
    |                       ^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "exit 1"]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:156:23
    |
156 |                 .args(&["/C", "exit 0"])
    |                       ^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "exit 0"]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:189:23
    |
189 |                 .args(&["/C", "echo hello"])
    |                       ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "echo hello"]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:213:23
    |
213 |                 .args(&["/C", "mkdir ."])
    |                       ^^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "mkdir ."]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:231:38
    |
231 |             Command::new("cmd").args(&["/C", "exit 1"]).spawn().unwrap()
    |                                      ^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "exit 1"]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:243:38
    |
243 |             Command::new("cmd").args(&["/C", "exit 1"]).spawn().unwrap()
    |                                      ^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "exit 1"]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: the borrowed expression implements the required traits
   --> tests/std.rs:257:23
    |
257 |                 .args(&["/C", "echo hello"])
    |                       ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["/C", "echo hello"]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
```
2023-06-11 22:26:44 +09:00
Taiki Endo 7eb60b1025 Bump MSRV to 1.63 2023-06-11 22:26:44 +09:00
John Nunley 5e48a40d6c
v1.7.0 (#41) 2023-04-07 10:47:16 -07:00
John Nunley 1a14d501cb
Fix minor typo in example.rs (#40) 2023-04-07 10:14:06 -07:00
Taiki Endo 01e36f4abe Update windows-sys to 0.48 2023-04-04 03:46:36 +09:00
Taiki Endo 99b9abc536 Minimize GITHUB_TOKEN permissions
Refs: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token
2023-03-26 16:35:52 +09:00
Taiki Endo 811dee59ac Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI 2023-03-26 16:35:38 +09:00
John Nunley e41847a378
ex: Add example for timed out process (#38) 2023-03-19 06:44:10 -07:00
dependabot[bot] 9f57bbfeb7 Update rustix requirement from 0.36 to 0.37
Updates the requirements on [rustix](https://github.com/bytecodealliance/rustix) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.36.0...v0.37.1)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 12:14:46 +09:00
dependabot[bot] e84c3fd53c Update windows-sys requirement from 0.42 to 0.45
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.42.0...0.45.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 11:32:45 +09:00
Taiki Endo e086897e53 Add windows::CommandExt::raw_arg on Rust 1.62+ 2022-12-30 14:31:53 +09:00
Taiki Endo f76d325959 Seal CommandExt trait
This is technically a breaking change, but we follow the standard
library's decision that sealing CommandExt is fine.
bfd1ccfb27
2022-12-30 14:31:53 +09:00
Taiki Endo 7980b4696a Reduce syscalls in blocking_fd 2022-12-30 13:43:50 +09:00
Taiki Endo 73f3f8f308 Fix clippy::needless_borrow warning
```
warning: the borrowed expression implements the required traits
   --> tests/std.rs:311:29
    |
311 |             cmd.env("PATH", &p);
    |                             ^^ help: change this to: `p`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `#[warn(clippy::needless_borrow)]` on by default
```
2022-12-30 13:43:50 +09:00
Taiki Endo 93be5c2506 Replace direct dependency on libc with rustix 2022-12-30 13:43:50 +09:00
Taiki Endo 2a2c1ee34a Bump MSRV to 1.47
On Windows, we depend on blocking and async-task that require Rust 1.47.
2022-12-28 12:44:10 +09:00
Taiki Endo 8226196372 Enable dependabot update for Rust 2022-12-28 12:44:10 +09:00
Taiki Endo 8559816dc6 Clean up CI config 2022-12-28 12:44:10 +09:00
Taiki Endo 580be7ee06 Release 1.6.0 2022-11-27 16:39:21 +09:00
John Nunley de1071784e
Port to windows-sys (#27) 2022-11-26 21:14:01 -08:00
Taiki Endo f835f75f39 Fix build failure with minimal-versions 2022-11-27 13:31:38 +09:00
Taiki Endo e1d6664e5a Remove msrv field from .clippy.toml
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml.
rust-lang/rust@b776fb8
2022-11-27 13:31:38 +09:00
John Nunley a44d0b418a
Port from once-cell to async-lock (#26) 2022-11-27 12:43:59 +09:00
Taiki Endo 115741b59a Update changelog 2022-08-21 18:25:48 +09:00
Taiki Endo 00f30f09e2 Release 1.5.0 2022-08-21 18:24:34 +09:00
John Nunley 8dda23e06b
Add `AsRawFd`/`AsFd` to the `ChildStd*` types (#23)
* add asrawfd/asfd impls

* fmt
2022-08-17 17:42:17 -07:00
Taiki Endo d9b78cb400 Fix clippy::needless_return warning in test
```
warning: unneeded `return` statement
  --> tests/std.rs:80:5
   |
80 |     return ret;
   |     ^^^^^^^^^^^ help: remove `return`: `ret`
   |
   = note: `#[warn(clippy::needless_return)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
```
2022-07-17 21:32:20 +09:00
Taiki Endo fbc300608c Fix clippy::single_match warning in test
```
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
  --> tests/std.rs:26:5
   |
26 | /     match Command::new("if-this-is-a-binary-then-the-world-has-ended").spawn() {
27 | |         Ok(..) => panic!(),
28 | |         Err(..) => {}
29 | |     }
   | |_____^ help: try this: `if let Ok(..) = Command::new("if-this-is-a-binary-then-the-world-has-ended").spawn() { panic!() }`
   |
   = note: `#[warn(clippy::single_match)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
```
2022-07-17 21:31:38 +09:00
Taiki Endo bffd4efe40 Apply clippy to all targets 2022-07-17 21:21:19 +09:00
Taiki Endo a23f4dc38e Update CI config 2022-07-08 02:35:56 +09:00
Taiki Endo 2e0881f64d Bump to v1.4.0 2022-05-01 13:57:48 +09:00
Taiki Endo f8c34c49ef Update actions/checkout action to v3 2022-05-01 13:51:49 +09:00
Taiki Endo 9a3fc54342
Merge pull request #21 from alex-berger/master
Impl From<std::process::Command> for Command
2022-01-28 09:54:35 +09:00
Alexander Berger 870cd2dc1f Impl From<std::process::Command> for Command
Allow creating Command from std::process::Command, similar to
what tokio::process::Command supports.
2022-01-27 20:46:09 +01:00
Taiki Endo 69789af2ca Remove rustfmt.toml 2022-01-09 01:25:47 +09:00
Taiki Endo 4661d33dfe Create GitHub release automatically 2022-01-08 22:03:27 +09:00
Taiki Endo 6beffb4373 Clean up CI config 2022-01-08 22:03:15 +09:00
Taiki Endo aa5e6c7cb4
Merge pull request #20 from doy/multiple-spawns
don't unconfigure stdio streams on spawn
2021-12-31 14:31:29 +09:00
Jesse Luehrs afff8c533d don't unconfigure stdio streams on spawn 2021-12-30 22:13:17 -05:00
Taiki Endo 327f176ba4 Bump to v1.3.0 2021-11-10 20:40:38 +09:00
Taiki Endo c8bdbc1de6
Merge pull request #18 from tailhook/better_debug
Improve debug implementation of `Command`
2021-10-11 23:22:26 +09:00