3 Matching Annotations
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
for cpp_file in *.cpp; do gcc -c $$cpp_file & done; wait This gives much finer control than make -j.
-
-
There is one very important reason for enabling job control to be useful inside scripts: the side-effect it has of placing background processes in their own process groups. This makes it much, much easier to send signels to them and their children with one simple command: kill -<signal> -$pgid. All other ways of dealing with signaling entire trees of processes either involve elaborate (sometimes even recursive) functions, which are often bugnests, or risk killing the parent in the process (no pun intended).
-