HF RL Explorer

Task: Implement a Bash Function That Returns the PID of a Background Process

Task: Implement a Bash Function That Returns the PID of a Background Process: a task in Terminal-Lego-15k (Harbor dataset). When writing Bash scripts, a common pattern is to launch a background process from within a function and capture its PID so it can be killed later. This is tricky because of…

The task

When writing Bash scripts, a common pattern is to launch a background process from within a function and capture its PID so it can be killed later. This is tricky because of how Bash handles subshells — when you capture a function's output with `$(function_name)`, the function runs in a subshell, and any variables…

Part of PrimeIntellect/Terminal-Lego-15k.