From 8aed6d66a7858ff45f8dd6a34237d3ca56b1fd32 Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 28 Apr 2025 10:45:27 +1000 Subject: [PATCH] Document handling of background process failures with `wait` --- SC2312.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2312.md b/SC2312.md index 2000e5e..99e00a2 100644 --- a/SC2312.md +++ b/SC2312.md @@ -39,7 +39,7 @@ By assigning it to a variable first, the exit code of the command will propagate ### Exceptions: -If you don't care about the command's exit status, or already handle it through a side channel like `<(cmd; echo $? > status)`, then you can either [[ignore]] the suggestion with a directive, or use `|| true` (or `|| :`) to suppress it. +If you don't care about the command's exit status, already handle it through a side channel like `<(cmd; echo $? > status)`, or (in the case of background processes and process substitution) wait on the result like `<(cmd) ; wait $!`, then you can either [[ignore]] the suggestion with a directive, or use `|| true` (or `|| :`) to suppress it. ### Related resources: