Skip to content

Commit

Permalink
find way to kill process without nix
Browse files Browse the repository at this point in the history
  • Loading branch information
slivingston committed Jan 2, 2025
1 parent bb4a3fd commit 75c2fce
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
23 changes: 0 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ futures = "0.3"
home = "0.5.3"
image = "0.24.6"
log = "0.4"
nix = "0.26"
rand = "0.8.5"
rerobots = "0.12"
serde = { version = "1.0", features = ["derive"] }
Expand Down
5 changes: 2 additions & 3 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

use std::collections::HashMap;
use std::process;
use std::sync::{mpsc, Arc, Mutex};
use std::time::Duration;

Expand All @@ -28,8 +29,6 @@ use awc::{

use futures::stream::{SplitSink, StreamExt};

use nix::{sys::signal, unistd};

extern crate serde;
extern crate serde_json;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -1166,7 +1165,7 @@ impl HSAPIClient {
std::fs::create_dir(&path)?
}
let path = path.join(format!("{}.pid", hscamera_id));
let pid = unistd::getpid();
let pid = process::id();
std::fs::write(&path, pid.to_string())?;

debug!("starting camera stream...");
Expand Down

0 comments on commit 75c2fce

Please sign in to comment.