3 ms·
Diagnosis for 2 is wrong. The shell won't be scheduled to truncate the file after the shell is scheduled to fork/exec cat. The shell is not multithreaded.
by tedunangst 17y ago
Diagnosis for 2 is wrong. The shell won't be scheduled to truncate the file after the shell is scheduled to fork/exec cat. The shell is not multithreaded.
- barrkel 17y agoThe shell doesn't need to be multithreaded to be scheduled; after the fork, there are multiple processes, not multiple threads. The shell that exec's cat is in a different process to the one that exec's $filter.