diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-06-24 09:00:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-06-24 09:00:04 +0200 |
commit | 421f09ca5d1326e01f65d3eeec41c2a34f2d026b (patch) | |
tree | 73265cec855272be50540e375f5c3e29ebcc70e0 | |
parent | 74b23809f3e100ad7d63cd746fd5ff3a93b4fdd5 (diff) |
-fix fd handling bug
m--------- | contrib/gana | 0 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 9 |
2 files changed, 6 insertions, 3 deletions
diff --git a/contrib/gana b/contrib/gana -Subproject 7048773eed952c30e4bc8e30d7caed083c18565 +Subproject d436db3d35975f820a69c4b55b3465c180a1003 diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index b54d450d4..ce35f5adf 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -2394,9 +2394,12 @@ run_fake_client (void) serve_port); if (0 == (cld = fork ())) { - GNUNET_break (0 == close (0)); - GNUNET_break (0 == dup2 (fd, 0)); - GNUNET_break (0 == close (fd)); + if (STDIN_FILENO != fd) + { + GNUNET_break (0 == close (0)); + GNUNET_break (0 == dup2 (fd, 0)); + GNUNET_break (0 == close (fd)); + } if ( (0 != execlp ("nc", "nc", "localhost", |