Skip to content

Commit ab6e081

Browse files
MCredbearKrysztal112233sylvestre
authored
pkill: implement (#290)
* pkill: init source * pkill: implement * pkill: implement `-e` * pkill: change `&mut self` to `&self` for `status`, `stat`, `start_time`'s args * pkill: implement `-H` * pkill: format code * pkill: remove .idea dir * pkill: beautify code * pkill: beautify code * pkill: fix Cargo.toml * pkill: remove duplicated process.rs * pkill: add unit tests * pkill: beautify code * pkill: fix CI failures for windows * pkill: fix CI failures for windows * pkill: fix CI failures for windows * pkill: fix CI failures for windows * pkill: fix CI failures for windows * pkill: fix CI failures for MacOS * pkill: fix CI failures for windows * pkill: fix CI failures for windows --------- Co-authored-by: Krysztal Huang <[email protected]> Co-authored-by: Sylvestre Ledru <[email protected]>
1 parent c2c0bab commit ab6e081

File tree

8 files changed

+505
-0
lines changed

8 files changed

+505
-0
lines changed

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ feat_common_core = [
3535
"pwdx",
3636
"slabtop",
3737
"snice",
38+
"pkill",
3839
"top",
3940
"w",
4041
"watch",
@@ -82,6 +83,7 @@ ps = { optional = true, version = "0.0.1", package = "uu_ps", path = "src/uu/ps"
8283
pwdx = { optional = true, version = "0.0.1", package = "uu_pwdx", path = "src/uu/pwdx" }
8384
slabtop = { optional = true, version = "0.0.1", package = "uu_slabtop", path = "src/uu/slabtop" }
8485
snice = { optional = true, version = "0.0.1", package = "uu_snice", path = "src/uu/snice" }
86+
pkill = { optional = true, version = "0.0.1", package = "uu_pkill", path = "src/uu/pkill" }
8587
top = { optional = true, version = "0.0.1", package = "uu_top", path = "src/uu/top" }
8688
w = { optional = true, version = "0.0.1", package = "uu_w", path = "src/uu/w" }
8789
watch = { optional = true, version = "0.0.1", package = "uu_watch", path = "src/uu/watch" }

src/uu/pkill/Cargo.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[package]
2+
name = "uu_pkill"
3+
version = "0.0.1"
4+
edition = "2021"
5+
authors = ["uutils developers"]
6+
license = "MIT"
7+
description = "pgrep ~ (uutils) Kills processes based on name and other attributes."
8+
9+
homepage = "https://github.com/uutils/procps"
10+
repository = "https://github.com/uutils/procps/tree/main/src/uu/pkill"
11+
keywords = ["acl", "uutils", "cross-platform", "cli", "utility"]
12+
categories = ["command-line-utilities"]
13+
14+
15+
[dependencies]
16+
uucore = { workspace = true }
17+
clap = { workspace = true }
18+
walkdir = { workspace = true }
19+
regex = { workspace = true }
20+
nix = { workspace = true, features = ["signal"] }
21+
22+
uu_pgrep = { path = "../pgrep" }
23+
24+
[lib]
25+
path = "src/pkill.rs"
26+
27+
[[bin]]
28+
name = "pkill"
29+
path = "src/main.rs"

src/uu/pkill/pkill.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# pgrep
2+
3+
```
4+
pkill [options] <pattern>
5+
```
6+
7+
Kills processes based on name and other attributes.

src/uu/pkill/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uucore::bin!(uu_pkill);

0 commit comments

Comments
 (0)