Files
lightning/common
ZmnSCPxj jxPCSnmZ 5356267f15 *: Use new closefrom module from ccan.
This also inadvertently fixes a latent bug: before this patch, in the
`subd` function in `lightningd/subd.c`, we would close `execfail[1]`
*before* doing an `exec`.
We use an EOF on `execfail[1]` as a signal that `exec` succeeded (the
fd is marked CLOEXEC), and otherwise use it to pump `errno` to the
parent.
The intent is that this fd should be kept open until `exec`, at which
point CLOEXEC triggers and close that fd and sends the EOF, *or* if
`exec` fails we can send the `errno` to the parent process vua that
pipe-end.

However, in the previous version, we end up closing that fd *before*
reaching `exec`, either in the loop which `dup2`s passed-in fds (by
overwriting `execfail[1]` with a `dup2`) or in the "close everything"
loop, which does not guard against `execfail[1]`, only
`dev_disconnect_fd`.
2021-10-22 13:17:37 +02:00
..
2021-10-15 12:09:36 +02:00
2020-10-21 19:34:39 +02:00
2020-09-23 16:30:36 +09:30
2020-04-04 16:08:49 +10:30
2020-04-04 16:08:49 +10:30
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00
2021-09-20 14:44:27 +02:00
2021-10-10 13:22:29 +02:00
2020-04-04 16:08:49 +10:30
2020-04-04 16:08:49 +10:30
2020-02-05 14:19:12 +01:00
2020-02-05 14:19:12 +01:00
2018-02-08 22:49:34 +01:00
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00
2020-01-23 16:17:42 +10:30
2021-10-15 12:09:36 +02:00
2019-04-16 21:22:13 +00:00
2020-10-20 12:50:31 +10:30
2021-10-15 12:09:36 +02:00
2021-10-15 12:09:36 +02:00