summaryrefslogtreecommitdiff
path: root/runtime/ops
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-09-25 01:33:15 +0200
committerGitHub <noreply@github.com>2021-09-25 01:33:15 +0200
commit4e2b59f9df5085025f08faea24e76b009e47f68d (patch)
tree61ff790ebfa172bb1635728e37636540859a1db1 /runtime/ops
parent683a38e47c47609d28bc6964f4b082885e477bf3 (diff)
cleanup(runtime): flatten op_kill's args (#12214)
Diffstat (limited to 'runtime/ops')
-rw-r--r--runtime/ops/process.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs
index 581bd4bb2..1f7280d48 100644
--- a/runtime/ops/process.rs
+++ b/runtime/ops/process.rs
@@ -307,17 +307,15 @@ pub fn kill(pid: i32, signal: i32) -> Result<(), AnyError> {
}
}
-#[derive(Deserialize)]
-struct KillArgs {
+fn op_kill(
+ state: &mut OpState,
pid: i32,
signo: String,
-}
-
-fn op_kill(state: &mut OpState, args: KillArgs, _: ()) -> Result<(), AnyError> {
+) -> Result<(), AnyError> {
super::check_unstable(state, "Deno.kill");
state.borrow_mut::<Permissions>().run.check_all()?;
- let signo = super::signal::signal_str_to_int(&args.signo)?;
- kill(args.pid, signo)?;
+ let signo = super::signal::signal_str_to_int(&signo)?;
+ kill(pid, signo)?;
Ok(())
}