Skip to content
  • Reed A. Cartwright's avatar
    Use exec to switch to node process · 843b05a6
    Reed A. Cartwright authored
    At the end of run, `exec` should be used to switch to the node process.  That way node will take over the pid of `sh run.sh`, making it easier to monitor and daemonize the server. 
    
    ```
        exec [command [arg ...]]
                 Unless command is omitted, the shell process is replaced with the
                 specified program (which must be a real program, not a shell
                 built-in command or function).  Any redirections on the exec com-
                 mand are marked as permanent, so that they are not undone when
                 the exec command finishes.
    ```
    843b05a6