commands
disown — adjust shell job handling
Mark a tracked job not to receive HUP from Bash. Without -h the job is removed from the table. No guarantee against other session policies. Use a fresh private workspace, ordinary user and bounded child processes; no sudo.
Formal Syntax & Structure
linux syntaxlinux
disown -h PIDParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -h | option | Mark the specified tracked job so Bash does not send it SIGHUP when Bash receives SIGHUP. |
| PID | operand | tracked job PID |
Return Value
exit status and output
Mark a tracked job not to receive HUP from Bash. Without -h the job is removed from the table. No guarantee against other session policies.
Working Example
Example Snippetlinux
sleep 0.5 &child=$!disown -h "$child"wait "$child" && printf 'marked job completed\n'