According to the documentation:

To prevent the shell from sending the SIGHUP signal to a particular job, it should be removed from the jobs table with the disown builtin or marked to not receive SIGHUP using disown -h.


Note the OR in the quote.

I can confirm that simply using disown without -h and re-logging that the process did not exit:


( sleep 10s; echo 1 > b ) &

It seems that the -h option is not necessary? If it works without then what is its purpose?

1 Answer 1


Without -h the job is removed from the table of active jobs, with -h it is not.

Everything is in the manual:

 disown [-ar] [-h] [jobspec ...]

       If the -h option is given, each jobspec is not removed
       from the table, but is marked so that SIGHUP is not sent to the
       job  if  the shell  receives  a SIGHUP.

To see the difference run jobs after disowning the job with and without -h.

  • I was reading the gnu.org manual which I've added a link to below the quote in my post. This is MUCH clearer.
    – Zhro
    Jul 1, 2016 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.