Skip to main content

rightkit_child_process/
lib.rs

1//! `OwnedCommand::inherit_handles_only` restricts inheritance to caller handles/fds plus stdio; Windows requires `windows_spawn_config` for opaque Command settings.
2
3mod capture;
4#[cfg(unix)]
5mod exit_watch;
6mod foreign;
7mod health;
8#[cfg(unix)]
9mod identity;
10#[cfg(all(test, unix))]
11mod identity_tests;
12mod launch;
13pub mod login_shell;
14mod no_window;
15mod owned;
16mod power;
17mod process_handle;
18#[cfg(unix)]
19mod process_unix;
20#[cfg(windows)]
21mod process_windows;
22mod registry;
23mod restart;
24pub mod reveal;
25mod run;
26#[cfg(windows)]
27mod spawn_windows;
28mod stall;
29mod stderr_tail;
30#[cfg(feature = "tokio")]
31pub mod tokio_support;
32#[cfg(unix)]
33mod unix_child;
34mod usage;
35#[cfg(windows)]
36pub mod windows_job;
37
38pub use capture::{read_bounded, CapturedOutput, OutputCapture};
39pub use foreign::{
40    find_processes, suspend_current_process, sweep, sweep_descendants, sweep_matching,
41    AdoptedIdentity, AdoptedSignal, IdentityCheck, MatchSweepOptions, MatchSweepReport,
42    MatchedProcess, ProcessQuery, SignalResult, StartToken, SweepReport,
43};
44#[cfg(unix)]
45pub use foreign::{resume_session, signal_session, suspend_session};
46pub use health::{HealthOutcome, HealthPolicy, HealthProbe, HealthTracker};
47pub use launch::{launch_app, open_url};
48pub use no_window::{command_std, NoWindow, CREATE_BREAKAWAY_FROM_JOB, CREATE_NO_WINDOW};
49pub use owned::{
50    AdoptedProcess, BreakawayDenied, JobAssignmentFailure, JobAssignmentMode, OwnedChild,
51    OwnedCommand, ProcessPriority, RawHandleOrFd, ReapOutcome, TerminationOptions, TreeTermination,
52    UnixContainment, WaitOutcome, DEFAULT_DROP_REAP_TIMEOUT, DEFAULT_ENV_ALLOWLIST,
53};
54pub use power::{PowerAssertion, PowerKind};
55pub use process_handle::ProcessHandle;
56pub use registry::{owned_count, terminate_all_owned, TerminateAllReport};
57pub use restart::{
58    ConsecutiveFailures, Generation, RestartMode, RestartOutcome, RestartPermit, RestartPolicy,
59    RestartTracker,
60};
61pub use run::{run, RunOptions, RunOutput};
62#[cfg(windows)]
63pub use spawn_windows::{with_windows_spawn_lock, WindowsChild, WindowsSpawnConfig, WindowsStdio};
64pub use stall::{
65    Ack, Cooldown, HeartbeatConfig, HeartbeatEvent, HeartbeatWatch, StallConfig, StallEvent,
66    StallWatchdog,
67};
68pub use stderr_tail::StderrTail;
69#[cfg(unix)]
70pub use unix_child::UnixChild;
71pub use usage::{
72    observe_idle, process_usage, BudgetLabels, IdleObservation, ProcessUsage, UsageRates,
73};
74#[cfg(windows)]
75pub use windows_job::{ExitReason, WindowsJob, WindowsJobBuilder, DEFAULT_ACTIVE_PROCESS_LIMIT};