]> Kevux Git Server - fll/commit
Update: Improve sleeping logic, also replacing sleep() with nanosleep().
authorKevin Day <thekevinday@gmail.com>
Sun, 31 Oct 2021 13:00:17 +0000 (08:00 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 31 Oct 2021 13:06:38 +0000 (08:06 -0500)
commitad4a95d1b8a26e271d491320b627dbdea443a13c
treee5e1f254b4bce0b5a3b2d543c072351b5586d291
parenta0f45f1f4785c762c95ebb551954fb29521e54e0
Update: Improve sleeping logic, also replacing sleep() with nanosleep().

The previous time-related regression fix introduced unblocking the signals as an immediate solution to its problem.

The preferred and intended design is to have the signal handling done by controller rather than done automatically.

Redesign the sleep functions to only unblock the signals for the sleep call.
Then re-lock the signal so that the intended design may be continued.

This then allows all appropriate cleanup functionality to operate as expected.
This can be confirmed with valgrind before/after and sending an interrupt during a validation process that utilizes a sleep (such as the example htop rule).

Create several functions to standardize some of the processes involved.

This also resolves a "todo" designating to replace sleep() with nanosleep().
level_3/controller/c/private-common.c
level_3/controller/c/private-common.h
level_3/controller/c/private-rule.c
level_3/controller/c/private-thread.c