Task: Demonstrate O CLOEXEC Flag Behavior in Fork/Exec Scenarios
Task: Demonstrate O CLOEXEC Flag Behavior in Fork/Exec Scenarios: a task in Terminal-Lego-15k (Harbor dataset). When a process opens file descriptors and then forks child processes that call exec() to run other programs, those file descriptors are by default inherited by the new program. The O…
The task
When a process opens file descriptors and then forks child processes that call `exec()` to run other programs, those file descriptors are by default inherited by the new program. The `O_CLOEXEC` flag can be used with `open()` to automatically close file descriptors when `exec()` is called.
Part of PrimeIntellect/Terminal-Lego-15k.