Skip to content

Commit

Permalink
src/systemcmds/topic_listener/listener_main.cpp: Fix topic_listener b…
Browse files Browse the repository at this point in the history
…locking on user input

This fixes an earlier commit
     commit 0b60318
     Author: Jukka Laitinen <[email protected]>
     Date:   Fri Apr 22 16:40:13 2022 +0400

         src/systemcmds/topic_listener: Change topic listener to poll only on uorb

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Feb 22, 2024
1 parent f4057b6 commit 513c554
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/systemcmds/topic_listener/listener_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ void listener(const orb_id_t &id, unsigned num_msgs, int topic_instance,

int time = 0;

// Make stdin non-blocking
fcntl(0, F_SETFL, O_NONBLOCK);

while (msgs_received < num_msgs) {

char c = 0;
Expand Down

0 comments on commit 513c554

Please sign in to comment.