Results for “Limits & process security”
Small, practical examples. Search by task or narrow things down below.
Check an external process exit status explicitly
PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.
PowerShell✓ Tested
Enable an init process for a service
Docker / Compose: init adds a small PID 1 process to forward signals and reap children.
Docker / Compose✓ Tested
Export a value to child processes
Bash Scripts: Only exported shell variables are inherited through the environment.
Bash Scripts✓ Tested
Extract a basename without an external process
Bash Scripts: Double hash removes the longest matching prefix ending in a slash.
Bash Scripts✓ Tested
Handle an expected child-process failure
Python: Catch CalledProcessError when check=True reports a nonzero exit status.
Python✓ Tested
Inspect the exit code of a completed process
Docker / Compose: Container state retains the exit code until the container is removed.
Docker / Compose✓ Tested
List running processes
Display process IDs, parent process IDs, and command names for all visible processes.
process✓ Tested
Override the process working directory
Docker / Compose: The workdir option sets the directory for the container command.
Docker / Compose✓ Tested
Pass an environment value to a child process
PowerShell: The process environment is inherited by a launched child PowerShell process.
PowerShell✓ Tested
Pipe input into a container process
Docker / Compose: The interactive flag keeps standard input open without allocating a terminal.
Docker / Compose✓ Tested
Process a FIFO queue
C#: Queue removes elements in the order they were enqueued.
C#✓ Tested
Process a file as a lazy line sequence
C#: ReadLines avoids allocating one string containing the entire file.
C#✓ Tested