Mojira Archive
MC-68633

Server does not run as a proper daemon

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)

Invalid

TheLocehiliosan

2014-08-21, 09:24 PM

2014-08-22, 09:21 AM

2014-08-22, 09:21 AM

0

2

Unconfirmed

Minecraft 1.7.10 - Minecraft 14w34dMinecraft 1.7.10, Minecraft 14w33c, Minecraft 14w34a, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d

-