You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When launching solanum for the first time, I hadn't looked at setting up the log directory yet, and it didn't have the right permissions.
The server said it was going into the background and then the process disappeared. When running it in the foreground, I get an error message about the permissions, but when running it normally I don't.
I saw in the code it goes into the background first and then sets up the logfiles, so that would explain that.
The text was updated successfully, but these errors were encountered:
Solanum indeed has a rather simplistic daemonization mechanism: at an early point in startup, it forks and the parent exits. The only improvement compared to daemon(3) is a message with the daemon's process ID. If this is worth improving, I suggest doing it like atheme, which opens a pipe between parent and daemon to allow the parent to wait until the daemon is fully initialized (the daemon also keeps stdin/stdout/stderr to the terminal until that point). Postponing the fork may lead to various issues since APIs like BSD kqueue and threads do not work properly across a fork.
Perhaps many installations don't actually use daemonization any more (e.g. with systemd unit files), so this may not be particularly relevant.
Hello, thank you for the reply, I'm not very familiar or should say not all familiar with the technique of forking, the pipes and file handles and all the associated stuff unfortunately.
So I don't know if they way it works at the moment is the only way to keep it simple as you said, or do it the way that you suggested. Didn't mean to sound like I knew better, it was just out of a lack of knowledge probably. Maybe it's not really worth looking at for them/you, and running it in the foreground I could clear it up for myself pretty quickly, but it did cause a few minutes of confusion which I thought didn't have to be there.
If I can add a suggestion, why not check the logfile permissions very early, so the user can definitely be notified. At least for me that's one of the classic hickups or oversights I make when first setting up a "service" by hand.
When launching solanum for the first time, I hadn't looked at setting up the log directory yet, and it didn't have the right permissions.
The server said it was going into the background and then the process disappeared. When running it in the foreground, I get an error message about the permissions, but when running it normally I don't.
I saw in the code it goes into the background first and then sets up the logfiles, so that would explain that.
The text was updated successfully, but these errors were encountered: