Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-68633

Server does not run as a proper daemon

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.7.10, Minecraft 14w33c, Minecraft 14w34a, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d
    • None
    • Linux
    • Unconfirmed

      Currently the server runs in the foreground. In order to automate the start and management of a server, it's necessary to wrap it inside something like GNU screen.

      A proper daemon implementation would:
      1. Fork a process in the background and dissociate from the controlling TTY
      2. Close any inherited file handles.
      3. Write all data to log files, not to stdout/stderr.
      4. Become the session leader / process group leader.
      5. Write a PID file.
      6. Change the CWD to / (so it doesn't keep any directory tied up when you need to unmount a file system)
      7. Drop privileges after listening on required TCP ports.
      8. Respond to SIGINT by gracefully shutting down.
      9. Possibly implement other control mechanisms, for example:
      a. Respond to SIGUSR1 by reloading configurations.
      b. Listen on a local port for controlling commands (similar to commands typed into the console today)

            Unassigned Unassigned
            thelocehiliosan TheLocehiliosan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: