-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
printtoconsole no longer works with daemon=1 #2559
Comments
Daemon: I can confirm the replicate this issue. I believe it's possible that when the daemon forking was fixed to work correctly it has caused this. The print to console may be just outputting to the void now. as bitcoin mentioned in : bitcoin/bitcoin#10132 Don't use -daemon with -printconsole as they state they do two different things. -daemon detaches itself from the terminal. It may be an inconvenience but I wouldn't consider it a bug. @div72 you have any input on this? you can always tail -f the debug file as an alternative |
We are actually following the behavior of Bitcoin Core now. Not sure this is a bug at all. Also not sure we want to revert and leave an attached fd. |
tail -f won't work to redirect to the systemd journal I think. Quite frankly, when the executable is being wrapped by a systemd service, there is NO REASON to have it fork as a daemon. The service should be set to simple mode and gridcoinresearchd should not be daemonized. Then the -printtoconsole will work as expected. We should document this, as it is equivalent to what has to be done for Bitcoin Core now. |
I'm fine with a fix in doc (everyone's favorite kind of fix!), I've already made the changes to the systemd service like @jamescowens mentioned. |
kudos on the nice bug report formatting |
Maybe we should do more than just change the documentation. Perhaps we should exit the application with an error (before forking) with an error to the console if both options are specified at once, as this is now a non-sensical combination that sends the debug output to the void? |
Bug Report
Current behavior
When gridcoin is run with the option daemon=1 and printtoconsole=1, no output is seen on the console, as the stdout of the process is closed upon forking.
Expected behavior
Previously, the process would fork and print debug.log output to the stdout of the executing process.
Steps to reproduce:
run gridcoinresearchd with daemon=1 and printtoconsole=1
Screenshots
Gridcoin version
5.4.0.0
Machine specs
Extra information
The text was updated successfully, but these errors were encountered: