Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ca13f8c authored by Chris Manton's avatar Chris Manton
Browse files

headless: Fix fcntl descriptor swap

Bug: 257972065
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I7baf85639b0fe6df0d0b49126c4270fa968449fc
parent 54a09dfc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -114,7 +114,8 @@ class Main : public HeadlessTest<int> {
  }

  int Run() override {
    console_fd = fcntl(STDERR_FILENO, F_DUPFD_CLOEXEC);
    console_fd = fcntl(STDERR_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO);
    ASSERT(console_fd != -1);
    if (options_.close_stderr_) {
      fclose(stderr);
    }