Closed jamescowens closed 6 years ago
I think that daemonize / fork to background should be removed, because the same functionality is provided by shell or systemd.
Probably right, (the & is a good thing...) but other bitcoin derivatives have it. Not sure we want to deviate too much. Also, without this change StartShutdown() (called when rpc stop is issued) malfunctions and does nothing.
Sent from my iPhone
On May 2, 2018, at 6:24 PM, Tomáš notifications@github.com wrote:
I think that daemonize / fork to background should be removed, because the same functionality is provided by shell or systemd.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
This should be working now, right?
Yes. Let’s close it.
Sent from my iPhone
On May 28, 2018, at 3:18 PM, Marco Nilsson notifications@github.com wrote:
This should be working now, right?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
The issue is that with a full autotools build where both the daemon and GUI version are built at the same time (i.e. with the config option --without-gui not set), the daemon is built with QT_GUI set. This causes the macros in init.cpp to malfunction, so the daemon built this way is actually broken. (It runs, but is not daemonized/will not fork to the background or respond to an rpc stop command.) To solve the problem, I have put in PR #1074, which implements a global flag fQtActive that is initially set in init.cpp to false. If Gridcoin is started via main in qt/bitcoin.cpp, this will be set to true. I replaced and/or augmented the macro defs in init.cpp to use if statements to check for the status of fQtActive to determine daemon behavior.