Browse Source

lightningd: don't join the config_dir to the pid_file path

pull/2803/head
darosior 5 years ago
committed by Christian Decker
parent
commit
4672795e1a
  1. 2
      CHANGELOG.md
  2. 5
      lightningd/lightningd.c

2
CHANGELOG.md

@ -20,6 +20,8 @@ changes.
### Fixed
- Relative `--lightning_dir` is now working again.
### Security
## [0.7.2.1] - 2019-08-19: "Nakamoto's Pre-approval by US Congress"

5
lightningd/lightningd.c

@ -543,9 +543,8 @@ static void pidfile_create(const struct lightningd *ld)
int pid_fd;
char *pid;
/* Create PID file: relative to .config dir unless absolute. */
pid_fd = open(path_join(tmpctx, ld->config_dir, ld->pidfile),
O_WRONLY|O_CREAT, 0640);
/* Create PID file: relative to .config dir. */
pid_fd = open(ld->pidfile, O_WRONLY|O_CREAT, 0640);
if (pid_fd < 0)
err(1, "Failed to open PID file");

Loading…
Cancel
Save