Skip to content

Commit 093074b

Browse files
committed
Merge #11419: Utils: Fix launchctl not being able to stop bitcoind
ab5bba7 Fix launchctl not being able to stop bitcoind (Alejandro Avilés) Pull request description: `bitcoind` should not be launched as daemon from the Launch Agent. Otherwise, the process cannot be stopped from `launchctl stop`/`launchctl unload`. To reproduce the issue: ```console $ launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist $ pgrep -fla bitcoin 60225 /usr/local/opt/bitcoin/bin/bitcoind $ launchctl unload ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist ``` Wait a few seconds and then run `pgrep` again: ```console $ pgrep -fla bitcoin 60225 /usr/local/opt/bitcoin/bin/bitcoind ``` The node is still running. This happens because Launch Agent is not supposed to run programs as daemons, since the agent makes sure they run in the background. Running them as daemons makes the Launch Agent lose control of the process and, so, it cannot be stopped. Tree-SHA512: 5342e1a858e478a226a1db292f1b8f8666bb252ee951753b131902c325ea3d47592cf245298decb423ac658a3175761b54dc2e7df6feea5343d65ba255613f67
2 parents b4a509a + ab5bba7 commit 093074b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

contrib/init/org.bitcoin.bitcoind.plist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<key>ProgramArguments</key>
88
<array>
99
<string>/usr/local/bin/bitcoind</string>
10-
<string>-daemon</string>
1110
</array>
1211
<key>RunAtLoad</key>
1312
<true/>

0 commit comments

Comments
 (0)