mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 08:57:47 +00:00
Add strsignal() and improve sharing signal numbers between LibC and kernel.
This commit is contained in:
parent
8d1f8b2518
commit
7c3746592b
15 changed files with 153 additions and 60 deletions
1
Userland/.gitignore
vendored
1
Userland/.gitignore
vendored
|
@ -18,3 +18,4 @@ kill
|
|||
tty
|
||||
ft
|
||||
ft2
|
||||
strsignal
|
||||
|
|
|
@ -15,6 +15,7 @@ OBJS = \
|
|||
mm.o \
|
||||
kill.o \
|
||||
ft.o \
|
||||
strsignal.o \
|
||||
tty.o
|
||||
|
||||
APPS = \
|
||||
|
@ -34,6 +35,7 @@ APPS = \
|
|||
mm \
|
||||
kill \
|
||||
ft \
|
||||
strsignal \
|
||||
tty
|
||||
|
||||
ARCH_FLAGS =
|
||||
|
@ -105,6 +107,9 @@ kill: kill.o
|
|||
tty: tty.o
|
||||
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
|
||||
|
||||
strsignal: strsignal.o
|
||||
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
|
|
11
Userland/strsignal.cpp
Normal file
11
Userland/strsignal.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
for (int i = 1; i < 32; ++i) {
|
||||
printf("%d: '%s'\n", i, strsignal(i));
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue