Skip to content

Commit 78d267d

Browse files
committed
Basic scaffold
Signed-off-by: Malhar Vora <mlvora.2010@gmail.com>
1 parent a3aef74 commit 78d267d

6 files changed

Lines changed: 63 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 9 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
@@ -33,6 +33,7 @@ feat_common_core = [
3333
"dmesg",
3434
"fsfreeze",
3535
"hexdump",
36+
"kill",
3637
"last",
3738
"lscpu",
3839
"lsipc",
@@ -105,6 +106,7 @@ chcpu = { optional = true, version = "0.0.1", package = "uu_chcpu", path = "src/
105106
ctrlaltdel = { optional = true, version = "0.0.1", package = "uu_ctrlaltdel", path = "src/uu/ctrlaltdel" }
106107
dmesg = { optional = true, version = "0.0.1", package = "uu_dmesg", path = "src/uu/dmesg" }
107108
fsfreeze = { optional = true, version = "0.0.1", package = "uu_fsfreeze", path = "src/uu/fsfreeze" }
109+
kill = { optional = true, version = "0.0.1", package = "uu_kill", path = "src/uu/kill" }
108110
hexdump = { optional = true, version = "0.0.1", package = "uu_hexdump", path = "src/uu/hexdump" }
109111
last = { optional = true, version = "0.0.1", package = "uu_last", path = "src/uu/last" }
110112
lscpu = { optional = true, version = "0.0.1", package = "uu_lscpu", path = "src/uu/lscpu" }

src/uu/kill/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "uu_kill"
3+
version = "0.0.1"
4+
edition = "2024"
5+
6+
[lib]
7+
path = "src/kill.rs"
8+
9+
[[bin]]
10+
name = "kill"
11+
path = "src/main.rs"
12+
13+
[dependencies]
14+
uucore = { workspace = true, features = ["entries"] }
15+
clap = { workspace = true }

src/uu/kill/kill.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# lsns
2+
3+
```
4+
kill [OPTION]...
5+
```
6+
7+
Send a signal to a job.

src/uu/kill/src/kill.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This file is part of the uutils util-linux package.
2+
//
3+
// For the full copyright and license information, please view the LICENSE
4+
// file that was distributed with this source code.
5+
6+
// Remove this if the tool is ported to Non-UNIX platforms.
7+
8+
use clap::{Command, crate_version};
9+
#[cfg(target_os = "linux")]
10+
#[cfg(target_os = "linux")]
11+
use uucore::{error::UResult, format_usage, help_about, help_usage};
12+
13+
const ABOUT: &str = help_about!("kill.md");
14+
const USAGE: &str = help_usage!("kill.md");
15+
16+
#[uucore::main]
17+
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
18+
let _matches = uu_app().try_get_matches_from(args)?;
19+
20+
Ok(())
21+
}
22+
23+
pub fn uu_app() -> Command {
24+
Command::new(uucore::util_name())
25+
.version(crate_version!())
26+
.about(ABOUT)
27+
.override_usage(format_usage(USAGE))
28+
.infer_long_args(true)
29+
}

src/uu/kill/src/main.rs

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

0 commit comments

Comments
 (0)