-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add another process * List processes * Print before exit * Print before exit and show processes after expected launch * Log input when waiter receives it * Explicitly make stdin piped * Get to the tests quicker * stdin piped, out inherit * Don't build binaries during test * Use prebuilt binaries * Tidy * Re-enable all CI checks * Fix resolve_pid include logic and remove unused deps * Ensure retry is included * Check formatting * Add a toolchain definition * Update Linux only tests * Remove unwraps that aren't needed * Fix lint errors * Lint errors * Lint with default features * Add cache
- Loading branch information
1 parent
7fb6787
commit ac08483
Showing
8 changed files
with
111 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[toolchain] | ||
channel = "1.82.0" | ||
components = ["rustfmt", "clippy"] | ||
profile = "minimal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
use crate::ProcCtlError::ConfigurationError; | ||
use crate::{Pid, ProcCtlResult}; | ||
|
||
#[cfg(any(target_os = "linux", feature = "proc"))] | ||
pub(crate) trait MaybeHasPid { | ||
fn get_pid(&self) -> Option<Pid>; | ||
fn get_pid(&self) -> Option<crate::Pid>; | ||
} | ||
|
||
pub(crate) fn resolve_pid(maybe_has_pid: &dyn MaybeHasPid) -> ProcCtlResult<Pid> { | ||
#[cfg(any(target_os = "linux", feature = "proc"))] | ||
pub(crate) fn resolve_pid(maybe_has_pid: &dyn MaybeHasPid) -> crate::ProcCtlResult<crate::Pid> { | ||
match &maybe_has_pid.get_pid() { | ||
Some(pid) => Ok(*pid), | ||
None => Err(ConfigurationError("unable to resolve a pid".to_string())), | ||
None => Err(crate::ProcCtlError::ConfigurationError( | ||
"unable to resolve a pid".to_string(), | ||
)), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters