From f369557ea7d79a57a942c2dcb07fba43553437fa Mon Sep 17 00:00:00 2001 From: Xevion Date: Tue, 19 Sep 2023 12:05:47 -0500 Subject: [PATCH] Tweak post formatting --- _posts/2023-07-26-race-conditions-in-signal-handlers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_posts/2023-07-26-race-conditions-in-signal-handlers.md b/_posts/2023-07-26-race-conditions-in-signal-handlers.md index b29220e..235a6b8 100644 --- a/_posts/2023-07-26-race-conditions-in-signal-handlers.md +++ b/_posts/2023-07-26-race-conditions-in-signal-handlers.md @@ -113,7 +113,7 @@ there's a way to check whether signal handlers have been provided or a process. On Unix systems (which is the only place you're going to find Unix signals), there's a special pseudo-filesystem that provides intimate details on a process. This includes things like the process's name, state, PID, memory usage, threads, -and of course: signal handlers. +and of course: *signal handlers*. See below, the contents of `/proc//status` for a process: @@ -151,7 +151,7 @@ See below, the contents of `/proc//status` for a process: 43 │ CapPrm: 0000000000000000 ``` -We're interested in SigCgt, which is a bitmask of signals that are caught by the process. The specific bit depends on the platform, but in Python, this can be found in the signal module: +We're interested in `SigCgt` (line 41), which is a bitmask of signals that are caught by the process. The specific bit depends on the platform, but in Python, this can be found in the signal module: ```python >>> from signal import SIGUSR1 @@ -159,7 +159,7 @@ We're interested in SigCgt, which is a bitmask of signals that are caught by the 10 ``` -We can parse the SigCgt value using the the `int` function and setting the radix to 16 (hexadecimal). +We can parse the `SigCgt` value using the the `int` function and setting the radix to 16 (hexadecimal). ```python >>> int("0000000f40800ef8", 16) @@ -177,7 +177,7 @@ Checking whether or not the Nth bit is set can be done with the bitwise AND oper If the result is non-zero, the bit is set. If the result is zero, the bit is not set. -By simply polling the process's signal handlers, we can wait for the signal handler to be registered before sending the SIGUSR1 signal. +By simply polling the process's signal handlers, we can wait for the signal handler to be registered before sending the `SIGUSR1` signal. Signal handlers are typically registered quickly, and they're