diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2022-02-26 18:20:08 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2022-03-03 12:05:57 +0100 |
commit | 8969cd1f19409b110c761ed5dda1d6cb57399a64 (patch) | |
tree | 89cd87dccb5dacc8d2f3aacc85ca62776e555bf5 /src/irmd | |
parent | 865515e2fe4651978f355613c5972dcdcfd92ddd (diff) | |
download | ouroboros-8969cd1f19409b110c761ed5dda1d6cb57399a64.tar.gz ouroboros-8969cd1f19409b110c761ed5dda1d6cb57399a64.zip |
lib: Flag all flows down as the IRMd exits
On exit of the IRMd all flows will now be flagged as down, so external
applications will not hang anymore. Note: reads keep work from flows
that are down until there are no more remaining packets in the buffer,
but no more packets can be written.
When the RIB is used, the external application may exit a bit later
than the IRMd, so I added a brief sleep before the IRMd tries to
remove the fuse main directory.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd')
-rw-r--r-- | src/irmd/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 5923286b..4b70c88b 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1846,8 +1846,9 @@ static void irm_fini(void) pthread_rwlock_destroy(&irmd.state_lock); #ifdef HAVE_FUSE + sleep(1); if (rmdir(FUSE_PREFIX)) - log_dbg("Failed to remove " FUSE_PREFIX); + log_warn("Failed to remove " FUSE_PREFIX); #endif } |