Move internal job ID type

Move this type to where its non-default instances are constructed.
This commit is contained in:
Johannes Altmanninger
2026-04-30 14:46:01 +08:00
parent 8328e53050
commit dad660cda5
2 changed files with 6 additions and 6 deletions

View File

@@ -19,7 +19,7 @@
redirection::RedirectionSpecList,
signal::{Signal, signal_set_handlers_once},
topic_monitor::{GenerationsList, Topic, topic_monitor_principal},
wait_handle::{InternalJobId, WaitHandle, WaitHandleRef, WaitHandleStore},
wait_handle::{WaitHandle, WaitHandleRef, WaitHandleStore},
wutil::{perror_nix, wbasename},
};
use cfg_if::cfg_if;
@@ -607,6 +607,10 @@ pub struct JobFlags {
pub is_group_root: bool,
}
/// The non user-visible, never-recycled job ID.
/// Every job has a unique positive value for this.
pub type InternalJobId = u64;
/// A struct representing a job. A job is a pipeline of one or more processes.
#[derive(Default)]
pub struct Job {

View File

@@ -1,12 +1,8 @@
use crate::prelude::*;
use crate::proc::Pid;
use crate::proc::{InternalJobId, Pid};
use std::cell::Cell;
use std::rc::Rc;
/// The non user-visible, never-recycled job ID.
/// Every job has a unique positive value for this.
pub type InternalJobId = u64;
/// The bits of a job necessary to support 'wait' and '--on-process-exit'.
/// This may outlive the job.
pub struct WaitHandle {