mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
subdaemon: start fds at 3 not 4.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
940053d000
commit
2f9b04b0d9
2 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,7 @@
|
|||
#include <wire/wire.h>
|
||||
#include <wire/wire_sync.h>
|
||||
|
||||
/* Stdout == status, stdin == requests, 3 == client */
|
||||
/* Stdout == status, stdin == requests, 3 == hsmfd */
|
||||
#define STATUS_FD STDOUT_FILENO
|
||||
#define REQ_FD STDIN_FILENO
|
||||
|
||||
|
@ -965,12 +965,12 @@ static void responder(int fd,
|
|||
}
|
||||
|
||||
#ifndef TESTING
|
||||
/* We expect hsmfd as fd 4, then a request then the clientfd */
|
||||
/* We expect hsmfd as fd 3, then a request then the clientfd */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
u8 *msg;
|
||||
struct pubkey my_id, their_id;
|
||||
int hsmfd = 4, clientfd;
|
||||
int hsmfd = 3, clientfd;
|
||||
struct secret ck, rk, sk;
|
||||
struct crypto_state *cs;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ static int subdaemon(const char *dir, const char *name,
|
|||
goto close_execfail_fail;
|
||||
|
||||
if (childpid == 0) {
|
||||
int fdnum = 4;
|
||||
int fdnum = 3;
|
||||
|
||||
if (reqfd)
|
||||
close(childreq[0]);
|
||||
|
|
Loading…
Add table
Reference in a new issue