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;
14#[cfg(any(unix, windows))]
15mod native_capture;
16mod no_window;
17mod owned;
18mod power;
19mod process_handle;
20mod process_table;
21#[cfg(unix)]
22mod process_unix;
23#[cfg(windows)]
24mod process_windows;
25mod registry;
26mod restart;
27pub mod reveal;
28mod run;
29#[cfg(windows)]
30mod spawn_windows;
31mod stall;
32mod stderr_tail;
33mod terminal;
34#[cfg(feature = "tokio")]
35pub mod tokio_support;
36#[cfg(unix)]
37mod unix_child;
38mod usage;
39#[cfg(windows)]
40pub mod windows_job;
41
42pub use capture::{read_bounded, CapturedOutput, OutputCapture};
43pub use foreign::{
44    find_processes, process_group_exists, suspend_current_process, sweep, sweep_descendants,
45    sweep_matching, wait_process_group_empty, AdoptedIdentity, AdoptedSignal, IdentityCheck,
46    MatchSweepOptions, MatchSweepReport, MatchedProcess, ProcessQuery, SignalResult, StartToken,
47    SweepReport,
48};
49#[cfg(unix)]
50pub use foreign::{resume_session, signal_session, suspend_session};
51pub use health::{HealthOutcome, HealthPolicy, HealthProbe, HealthTracker};
52pub use launch::{launch_app, open_url};
53#[cfg(any(unix, windows))]
54pub use native_capture::NativeOutputCapture;
55pub use no_window::{command_std, NoWindow, CREATE_BREAKAWAY_FROM_JOB, CREATE_NO_WINDOW};
56pub use owned::{
57    AdoptedProcess, BreakawayDenied, JobAssignmentFailure, JobAssignmentMode, OwnedChild,
58    OwnedCommand, ProcessPriority, RawHandleOrFd, ReapOutcome, TerminationOptions, TreeTermination,
59    UnixContainment, WaitOutcome, DEFAULT_DROP_REAP_TIMEOUT, DEFAULT_ENV_ALLOWLIST,
60};
61pub use power::{PowerAssertion, PowerKind};
62pub use process_handle::ProcessHandle;
63pub use process_table::{process_table, ProcessEntry};
64pub use registry::{owned_count, terminate_all_owned, TerminateAllReport};
65pub use restart::{
66    ConsecutiveFailures, Generation, RestartMode, RestartOutcome, RestartPermit, RestartPolicy,
67    RestartTracker,
68};
69pub use run::{
70    run, run_command, run_command_capture, run_streaming, run_with_stdin, CaptureOptions,
71    LeaderTermination, RunOptions, RunOutput, RunnerFailure, RunnerPhase, StreamOptions,
72    StreamOutput,
73};
74#[cfg(windows)]
75pub use spawn_windows::{with_windows_spawn_lock, WindowsChild, WindowsSpawnConfig, WindowsStdio};
76pub use stall::{
77    Ack, Cooldown, HeartbeatConfig, HeartbeatEvent, HeartbeatWatch, StallConfig, StallEvent,
78    StallWatchdog,
79};
80pub use stderr_tail::StderrTail;
81pub use terminal::status_inherited_terminal;
82#[cfg(unix)]
83pub use unix_child::UnixChild;
84pub use usage::{
85    observe_idle, observe_idle_with_threads, process_usage, process_usage_with_threads,
86    thread_deltas, tree_usage, BudgetLabels, IdleObservation, IdleThreadObservation,
87    ProcessThreads, ProcessUsage, ThreadDelta, ThreadDeltas, ThreadSample, TreeUsage, UsageRates,
88};
89#[cfg(windows)]
90pub use windows_job::{ExitReason, WindowsJob, WindowsJobBuilder, DEFAULT_ACTIVE_PROCESS_LIMIT};