Skip to content

Commit

Permalink
Revert "platforms/nuttx/src/px4/common/px4_init.cpp: Set stderr NON_B…
Browse files Browse the repository at this point in the history
…LOCKING"

This reverts commit 6773531.
  • Loading branch information
jlaitine committed Jan 21, 2025
1 parent 5b5aed9 commit 015840c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions platforms/nuttx/src/px4/common/px4_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,6 @@ int px4_platform_init()
if (fd_buf >= 0) {
dup2(fd_buf, 1);
// keep stderr(2) untouched: the buffered console will use it to output to the original console
// set stderr non-blocking, as it may be an uart device, and we don't want anyone printing
// to uart to block on e.g. full buffers

int flags = fcntl(2, F_GETFL);

if (flags < 0) {
syslog(LOG_ERR, "fcntl(F_GETFL) fail.");
}

flags |= O_NONBLOCK;

if (fcntl(2, F_SETFL, flags) < 0) {
syslog(LOG_ERR, "fcntl(F_SETFL) fail.");
}

close(fd_buf);
}

Expand Down

0 comments on commit 015840c

Please sign in to comment.