Loading...
Searching...
No Matches
POSIX process utilities

Definition

Low-level POSIX implementation of process inspection routines.

This module provides helper procedures used internally by fpx_process to inspect running processes on Unix-like systems.

Detection strategy:

  1. /proc/<pid>/comm (Linux only, fastest)
  2. ps

/proc is preferred because it requires no subprocess creation and returns only the executable name.

The ps fallback works on Linux, macOS, FreeBSD, OpenBSD, Solaris and virtually every POSIX implementation.

Methods

◆ get_parent_pid_posix()

integer function, public get_parent_pid_posix

Return parent PID (PPID) on POSIX systems.

Minimal, deterministic implementation based on /proc/self/status. No shell, no parsing hacks, no external dependencies.

Definition at line 35 of file process_posix.f90.