I have these three lines:
export bunion_uds_file="$bunion_socks/$(uuidgen).sock";
"$cmd" "$@" | bunion
rm -f "$bunion_uds_file"
I need to make sure the last line always executes..I could do this:
export bunion_uds_file="$bunion_socks/$(uuidgen).sock";
(
set +e
"$cmd" "$@" | bunion
rm -f "$bunion_uds_file"
)
or maybe like this:
export bunion_uds_file="$bunion_socks/$(uuidgen).sock";
"$cmd" "$@" | bunion && rm -f "$bunion_uds_file" || rm -f "$bunion_uds_file"
I assume creating the subshell and using set +e is slightly less performant etc.
SIGKILL. Then the next instance will fail withEADDRINUSEwhen trying to bind to it.