Browse Source

subdaemon: start fds at 3 not 4.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
2f9b04b0d9
  1. 6
      lightningd/handshake/handshake.c
  2. 2
      lightningd/subdaemon.c

6
lightningd/handshake/handshake.c

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

2
lightningd/subdaemon.c

@ -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…
Cancel
Save