Results for “Dates & process utilities”
Small, practical examples. Search by task or narrow things down below.
Generate a half-open range of dates
Java: datesUntil includes the starting date and excludes the end date.
Java✓ Tested
Handle an expected child-process failure
Python: Catch CalledProcessError when check=True reports a nonzero exit status.
Python✓ Tested
Insert Docker’s small init process
Docker / Compose: The init option adds a PID 1 process that reaps children and forwards signals.
Docker / Compose✓ 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
Limit the number of container processes
Docker / Compose: The pids-limit setting caps the container’s process count.
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
Process a first-in first-out queue
C++: Queue exposes its front item separately from the operation that removes it.
C++✓ Tested