Skip to content

Commit

Permalink
fesvr/htif: allow exit on SIGINT.
Browse files Browse the repository at this point in the history
Currently signal handler would call exit() only on second received
signal, this prevent proper program cleanup.
Instead use signal flag to exit loop.

Signed-off-by: Volodymyr Fialko <[email protected]>
  • Loading branch information
f0rget-the-sad committed Nov 9, 2023
1 parent 5f576bd commit f04be98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fesvr/htif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int htif_t::run()
std::bind(enq_func, &fromhost_queue, std::placeholders::_1);

if (tohost_addr == 0) {
while (true)
while (!signal_exit)
idle();
}

Expand Down

0 comments on commit f04be98

Please sign in to comment.