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

This commit is contained in:
darosior 2019-09-04 13:16:23 +02:00 committed by Christian Decker
parent 10ed2ebdb4
commit 4672795e1a
2 changed files with 4 additions and 3 deletions

View File

@ -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"

View File

@ -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");