github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/commands/bg.md (about)

     1  # `bg`
     2  
     3  > Run processes in the background
     4  
     5  ## Description
     6  
     7  `bg` supports two modes: it can either be run as a function block which will
     8  execute in the background, or it can take stopped processes and daemonize
     9  them.
    10  
    11  ## Usage
    12  
    13  POSIX only:
    14   ```
    15   bg { code block }
    16  
    17   bg fid
    18   ```
    19  
    20  ## Examples
    21  
    22  
    23  ```
    24  bg { sleep 5; out "Morning" }
    25  ```
    26  
    27  ## Detail
    28  
    29  The examples above will work on any system (Windows included). However the
    30  `ctrl+z` usage of backgrounding a stopped process (like Bash) is only
    31  supported on POSIX systems due to the limitation of required signals on
    32  non-platforms. This means the usage described in the examples is cross
    33  cross platform while `bg int` currently does not work on Windows nor Plan 9.
    34  
    35  ## See Also
    36  
    37  * [`exec`](../commands/exec.md):
    38    Runs an executable
    39  * [`fg`](../commands/fg.md):
    40    Sends a background process into the foreground
    41  * [`fid-kill`](../commands/fid-kill.md):
    42    Terminate a running Murex function
    43  * [`fid-killall`](../commands/fid-killall.md):
    44    Terminate _all_ running Murex functions
    45  * [`fid-list`](../commands/fid-list.md):
    46    Lists all running functions within the current Murex session
    47  * [`jobs`](../commands/fid-list.md):
    48    Lists all running functions within the current Murex session
    49  
    50  <hr/>
    51  
    52  This document was generated from [builtins/core/processes/bgfg_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/core/processes/bgfg_doc.yaml).