# make function run async in the background
# fully detached from the parent executing script
# fully detached subshell without a parent zombie
# by redirecting output within the subshell and detaching the parent shell entirely
# see: https://overflow.adminforge.de/exchange/superuser.com/questions/1717487/#1718686
main() {
  (
    trap '' HUP INT
    ${cmd_exec} <<<"${cmd}" >"${TMPDIR:-/tmp}/log"
    # function_to_run >"${TMPDIR:-/tmp}/log"
  ) <'/dev/null' >'/dev/null' 2>'/dev/null' &
}
