From dad660cda5d7166e7311aca0cb0869ddca21c05b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 30 Apr 2026 14:46:01 +0800 Subject: [PATCH] Move internal job ID type Move this type to where its non-default instances are constructed. --- src/proc.rs | 6 +++++- src/wait_handle.rs | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/proc.rs b/src/proc.rs index 4a733f2ca..e233d846c 100644 --- a/src/proc.rs +++ b/src/proc.rs @@ -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 { diff --git a/src/wait_handle.rs b/src/wait_handle.rs index 0c3db14a2..e361a402c 100644 --- a/src/wait_handle.rs +++ b/src/wait_handle.rs @@ -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 {