summaryrefslogtreecommitdiff
path: root/src/sys/ptrace/bsd.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-05-30 12:27:39 -0600
committerAlan Somers <asomers@gmail.com>2021-05-30 20:12:41 -0600
commit7b7d9540056f6378820caf955a0335268184d6b7 (patch)
treef27fa7b8dbb4d089c0f7bda9569bfab8ead1b4dc /src/sys/ptrace/bsd.rs
parenta55dd4537286c8fbd96e3e21e18c56a38f8124b9 (diff)
downloadnix-7b7d9540056f6378820caf955a0335268184d6b7.zip
misc Clippy cleanup
* Fix race conditions in the tests. Two tests were grabbing a mutex but immediately dropping it. Thank you, Clippy. * Remove vestigial Windows support. Remove some code added to support Windows in 2015. Nix is no longer intended to ever run on Windows. * Various other minor Clippy lints.
Diffstat (limited to 'src/sys/ptrace/bsd.rs')
-rw-r--r--src/sys/ptrace/bsd.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/sys/ptrace/bsd.rs b/src/sys/ptrace/bsd.rs
index e85afc76..141dfbc4 100644
--- a/src/sys/ptrace/bsd.rs
+++ b/src/sys/ptrace/bsd.rs
@@ -133,16 +133,14 @@ pub fn kill(pid: Pid) -> Result<()> {
/// use nix::unistd::Pid;
/// use nix::sys::signal::Signal;
/// use nix::sys::wait::*;
-/// fn main() {
-/// // If a process changes state to the stopped state because of a SIGUSR1
-/// // signal, this will step the process forward and forward the user
-/// // signal to the stopped process
-/// match waitpid(Pid::from_raw(-1), None) {
-/// Ok(WaitStatus::Stopped(pid, Signal::SIGUSR1)) => {
-/// let _ = step(pid, Signal::SIGUSR1);
-/// }
-/// _ => {},
+/// // If a process changes state to the stopped state because of a SIGUSR1
+/// // signal, this will step the process forward and forward the user
+/// // signal to the stopped process
+/// match waitpid(Pid::from_raw(-1), None) {
+/// Ok(WaitStatus::Stopped(pid, Signal::SIGUSR1)) => {
+/// let _ = step(pid, Signal::SIGUSR1);
/// }
+/// _ => {},
/// }
/// ```
#[cfg(