• 0 Open
    4 Closed
    Updated 2025-06-24 16:45:54 -04:00
    Closed 2017-09-02 04:29:17 -04:00

    The Daemon project needs to be created with the following elements:

    • A proper .gitignore file.
    • A README file with the name of the project and a basic description written in markdown.
    • Have correct Cargo compilation
    • Run as an executable
  • 0 Open
    1 Closed
    Updated 2025-06-24 16:45:54 -04:00
    Closed 2017-10-11 01:09:02 -04:00

    To properly create create a Daemon it needs to accomplish the following tasks.

    • Fork the process and exit.
    • Create a new session with a new process group and become the session leader and process group leader.
    • Fork the process and exit again to no longer be the session leader and a TTY cannot accidentally be take control of it.
    • Change the working directory of the program to the "/" directory, so it can not be unmounted.
    • Adjust the umask settings to not depend on the callers settings.
    • Close any inherited files if there are any like stdin, stdout, stderr.