Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LibOS] Use
-1
for special signal value instead of 0xff
Gramine allows to inject only one SIGTERM (signal number 15). To distinguish a case when SIGTERM was already injected, LibOS atomically updates a global variable to a special value meaning "SIGTERM was injected". Previously, this special value was chosen as `0xff` for no obvious reason. This leads to an artificial requirement that valid signals cannot have numbers greater than or equal to 255 (`0xff`). This commit removes this artificial requirement by replacing `0xff` with `-1`. This is possible because signals are always of type `int`. Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
- Loading branch information