Automatic Termination After Background Job Completes

Nathan Royce <[email protected]> Fri, 4 Apr 2025 08:09:46 -0500
Newsgroups org.kernel.vger.dash
Message-ID <CALaQ_hoenH-y1+vh1M8dYyBMvPoanBXLumHi3o=Rq2MYghLU7g@mail.gmail.com>
Setting an emacs/vi flag when starting dash, and using an external
command for a background job, the shell terminates once the job
completes.

1) Good (builtin command)
$ exec dash -E
  $ (printf "hello) &

2) Good (external command)
$ exec dash
  $ sleep 5 &

3) Bad (external command)
$ exec dash -E
  $ sleep 5 &