Skip to content

Commit

Permalink
lightningd: fix backwards test in sigchld.
Browse files Browse the repository at this point in the history
This would never trigger, since test was backward.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jan 24, 2022
1 parent 409b269 commit beed4fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightningd/lightningd.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ static void on_sigchild(int _ UNUSED)
* __attribute__((warn_unused_result)) means we have to
* "catch" the return value. */
if (write(sigchld_wfd, "", 1) != 1) {
if (errno != EAGAIN && errno == EWOULDBLOCK) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
/* Should not call this in a signal handler, but we're
* already messed up! */
fatal("on_sigchild: write errno %s", strerror(errno));
Expand Down

0 comments on commit beed4fc

Please sign in to comment.