Skip to content

Commit

Permalink
Merge pull request #95 from elfenpiff/iox2-4-add-faq-entry
Browse files Browse the repository at this point in the history
[#4] Add FAQ entry for resource cleanup
  • Loading branch information
elfenpiff authored Jan 19, 2024
2 parents 6eb0529 + fa055d0 commit 5d91cc7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Frequently Asked Questions

## Application does not remove services/ports on shutdown or several application restarts lead to port count exceeded

The structs of iceoryx2 need to be able to cleanup all resources when they
go out of scope. This is not the case when the application is:

* killed with the sigkill signal (`kill -9`)
* the `SIGTERM` signal is not explicitly handled

iceoryx2 already provides a mechanism that registers a signal handler that
handles termination requests gracefully, see
[publish subscribe example](examples/examples/publish_subscribe) and

```rust
while let Iox2Event::Tick = Iox2::wait(CYCLE_TIME) {
// user code
}
```

But you can also use a crate like [ctrlc](https://docs.rs/ctrlc/latest/ctrlc/).

## How to use `log` or `tracing` as default log backend

* **log**, add the feature flag `logger_log` to the dependency in `Cargo.toml`
Expand Down

0 comments on commit 5d91cc7

Please sign in to comment.