]> git.corax.cc Git - toolbox/commit
include/inst: Allow terminated instances to be cleaned up properly
authorMatthias Kruk <m@m10k.eu>
Sat, 26 Nov 2022 03:41:25 +0000 (12:41 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 26 Nov 2022 03:41:25 +0000 (12:41 +0900)
commit78573c48aad68170a197bf7a81af51309fc5c06e
treedf11ee653caa1a1254a28ea3eb492b23f8f8acea
parentc39f4e99805b3d8973911f9f7f68283313ce4b69
include/inst: Allow terminated instances to be cleaned up properly

The signal handler that is registered by `_inst_run()' catches the
EXIT and QUIT signals, which causes the handler to be executed one
more time before the process ends. The semaphore that the handler
will attempt to manipulate at that point will have already been
removed, causing the handler to end up in an infinite loop.

This commit changes the trap call so that the EXIT and QUIT signals
are not handled, preventing the signal handler from being executed
more than once.
include/inst.sh