Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 533 Bytes

fork-to-bg.md

File metadata and controls

15 lines (11 loc) · 533 Bytes

Fork a command to background

Often you require a command to run in the background, independent of your shell login status so that the lengthy process can be carried our while you are working out something else.

The stackoverflow answer has several suggestions.

  1. Create a subshell with (..)
  2. Use setsid(1)
  3. Use disown builtin command

On a side note, use jobs to find out running jobs in the background.