[wildfly-dev] Wildfly start-up as service script depends on console log to determinate start result
Jason T. Greene
jason.greene at redhat.com
Fri Jun 12 08:06:05 EDT 2015
> On Jun 10, 2015, at 11:46 AM, Brian Stansberry <brian.stansberry at redhat.com> wrote:
>
> So, what purpose is this fulfilling?
>
> 2) How does other software solve this problem? If it's solving a valid
> problem, it seems like there would be a typical solution.
The classic UNIX solution is that the daemon forks and returns, dropping a PID file of its child to disk, after it is done initializing and exits with an error code when there is a problem.
Systemd added other approaches, where a daemon can signal systemd directly, or it can use dbus to send a message.
The former can't be done efficiently in Java because it doesn't have a pure fork(), only an exec. Although it would be possible to emulate with an exec with an unacceptable hit to boot time. The latter options are too Linux specific.
I think the best solution would be for us to add a signaling mechanism specifically for this purpose. We could use sun.misc.Signal (potentially an issue on Java 9), or we could exec the kill command to signal a process.
We could also use a specially status file (e.g standalone.sh --start-status-file=blah) for a script to monitor.
Thoughts?
More information about the wildfly-dev
mailing list