⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

ProcessServer

Struct ProcessServer 

Source
pub struct ProcessServer { /* private fields */ }
Expand description

Global process server instance

Implementations§

Source§

impl ProcessServer

Source

pub fn new() -> Self

Create a new process server

Source§

impl ProcessServer

Source

pub fn create_process( &self, parent_pid: ProcessId, name: String, uid: u32, gid: u32, command_line: Vec<String>, environment: Vec<String>, ) -> Result<ProcessId, KernelError>

Create a new process

Source

pub fn terminate_process( &self, pid: ProcessId, exit_code: i32, ) -> Result<(), KernelError>

Terminate a process

Source

pub fn wait_for_child( &self, parent_pid: ProcessId, specific_pid: Option<ProcessId>, ) -> Result<(ProcessId, i32), KernelError>

Wait for a child process

Source

pub fn get_process_info(&self, pid: ProcessId) -> Option<ProcessInfo>

Get process information

Source

pub fn list_processes(&self) -> Vec<ProcessInfo>

List all processes

Source

pub fn set_resource_limits( &self, pid: ProcessId, limits: ResourceLimits, ) -> Result<(), KernelError>

Set resource limits for a process

Source

pub fn get_resource_limits(&self, pid: ProcessId) -> Option<ResourceLimits>

Get resource limits for a process

Source

pub fn create_session(&self, leader_pid: ProcessId) -> Result<u32, KernelError>

Create a new session

Source

pub fn create_process_group( &self, leader_pid: ProcessId, session_id: u32, ) -> Result<u32, KernelError>

Create a new process group

Source

pub fn send_signal( &self, pid: ProcessId, signal: i32, ) -> Result<(), KernelError>

Send signal to process

Source

pub fn update_process_stats( &self, pid: ProcessId, cpu_time: u64, memory_usage: u64, )

Update process statistics

Source

pub fn reap_zombies(&self) -> usize

Clean up zombie processes

Source

pub fn get_statistics(&self) -> ProcessServerStats

Get system statistics

Source

pub fn list_process_ids(&self) -> Vec<ProcessId>

List all active process IDs

Source

pub fn notify_capability_revoked(&self, _pid: ProcessId, _cap_id: u64)

Notify a process that a capability has been revoked

Trait Implementations§

Source§

impl Default for ProcessServer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !Freeze for ProcessServer

§

impl !RefUnwindSafe for ProcessServer

§

impl Send for ProcessServer

§

impl Sync for ProcessServer

§

impl Unpin for ProcessServer

§

impl UnwindSafe for ProcessServer

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.