mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
lightningd: Defer creating the PID until we actually want to start
This was causing `--help` to fail if we already had a `lightningd` running with the same `--lightning-dir`. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
e2f9a410f4
commit
820b52207e
1 changed files with 4 additions and 4 deletions
|
@ -672,10 +672,6 @@ int main(int argc, char *argv[])
|
|||
* say --daemonize. */
|
||||
handle_early_opts(ld, argc, argv);
|
||||
|
||||
/*~ Now create the PID file: this errors out if there's already a
|
||||
* daemon running, so we call before doing almost anything else. */
|
||||
pidfile_create(ld);
|
||||
|
||||
/*~ Initialize all the plugins we just registered, so they can
|
||||
* do their thing and tell us about themselves (including
|
||||
* options registration). */
|
||||
|
@ -684,6 +680,10 @@ int main(int argc, char *argv[])
|
|||
/*~ Handle options and config; move to .lightningd (--lightning-dir) */
|
||||
handle_opts(ld, argc, argv);
|
||||
|
||||
/*~ Now create the PID file: this errors out if there's already a
|
||||
* daemon running, so we call before doing almost anything else. */
|
||||
pidfile_create(ld);
|
||||
|
||||
/*~ Make sure we can reach the subdaemons, and versions match. */
|
||||
test_subdaemons(ld);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue