Skip to content

Commit 8e05a66

Browse files
authored
Merge pull request #407 from grisenti/main
sh: remove dependencies
2 parents 9103232 + c4234db commit 8e05a66

28 files changed

+1062
-558
lines changed

Cargo.lock

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

sh/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ version = "0.1.7"
44
edition = "2021"
55

66
[dependencies]
7-
plib = { path = "../plib" }
87
gettext-rs.workspace = true
9-
nix = { version = "0.29", features = ["process", "fs", "resource", "signal", "user", "term"] }
10-
atty = "0.2"
8+
libc.workspace = true
9+
10+
[dev-dependencies]
11+
plib = { path = "../plib" }
1112

1213
[[bin]]
1314
name = "sh"

sh/builtin/bg.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
use crate::builtin::{skip_option_terminator, BuiltinResult, BuiltinUtility};
1111
use crate::jobs::{parse_job_id, Job, JobState};
12+
use crate::os::signals::{kill, Signal};
1213
use crate::shell::opened_files::OpenedFiles;
1314
use crate::shell::Shell;
14-
use nix::sys::signal::kill;
1515

1616
fn run_background_job(
1717
arg: &str,
@@ -23,7 +23,7 @@ fn run_background_job(
2323
"bg: job {arg} is already running in the background"
2424
));
2525
}
26-
kill(job.pid, nix::sys::signal::SIGCONT)
26+
kill(job.pid, Some(Signal::SigCont))
2727
.map_err(|err| format!("bg: failed to resume job {arg} ({err})"))?;
2828
opened_files.write_out(format!("[{}] {}\n", job.number, job.command));
2929
job.state = JobState::Running;

0 commit comments

Comments
 (0)