aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-06-17 16:52:53 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-06-17 16:52:53 +0200
commit7865579b34ed68b486447fd25e2f000cbe1f4a2b (patch)
tree5d4e4dd42226e12771f1fd5cabb55a042efba27c
parent2c9274a5f7e73359848adc84fd932af313f143b9 (diff)
downloadmitjafelicijan.com-7865579b34ed68b486447fd25e2f000cbe1f4a2b.tar.gz
Note: Sending signals to C programs
-rw-r--r--content/notes/2024-06-17-sending-signals-to-c-programs.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/notes/2024-06-17-sending-signals-to-c-programs.md b/content/notes/2024-06-17-sending-signals-to-c-programs.md
index 187beeb..75d5990 100644
--- a/content/notes/2024-06-17-sending-signals-to-c-programs.md
+++ b/content/notes/2024-06-17-sending-signals-to-c-programs.md
@@ -20,7 +20,7 @@ though this is really not advisable.
20#include <unistd.h> 20#include <unistd.h>
21 21
22void handle_signal(int signal) { 22void handle_signal(int signal) {
23 printf("Signal received %d\n", signal); 23 printf("Signal received: %d\n", signal);
24} 24}
25 25
26int main() { 26int main() {
@@ -37,7 +37,7 @@ int main() {
37 37
38Compile with `gcc -o signal signal.c` and run the program with `./signal` and 38Compile with `gcc -o signal signal.c` and run the program with `./signal` and
39then from another terminal send the signal to the program with `kill -10 39then from another terminal send the signal to the program with `kill -10
40$(pidof signal)` which should print out `Signal received 10`. 40$(pidof signal)` which should print out `Signal received: 10`.
41 41
42| Signal | x86/ARM | Alpha/ | MIPS | PARISC | Notes | 42| Signal | x86/ARM | Alpha/ | MIPS | PARISC | Notes |
43|-----------|---------|--------|------|--------|---------------| 43|-----------|---------|--------|------|--------|---------------|