summaryrefslogtreecommitdiff
path: root/libbb/u_signal_names.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-09-29 22:26:01 +0000
committerDenis Vlasenko2007-09-29 22:26:01 +0000
commit72e1c89d971aa2e37abf705c6a01f002deac09b8 (patch)
tree6edb25e260701f9f6e49769e4bb7e31e7e2e6063 /libbb/u_signal_names.c
parent2450e4ba44707a64920ea6c9276930a1210e76cc (diff)
downloadbusybox-72e1c89d971aa2e37abf705c6a01f002deac09b8.zip
busybox-72e1c89d971aa2e37abf705c6a01f002deac09b8.tar.gz
pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>
Diffstat (limited to 'libbb/u_signal_names.c')
-rw-r--r--libbb/u_signal_names.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index f8eaea7..5a6f592 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -159,3 +159,18 @@ const char *get_signame(int number)
return itoa(number);
}
+
+
+// Print the whole signal list
+
+void print_signames_and_exit(void)
+{
+ int signo;
+
+ for (signo = 1; signo < ARRAY_SIZE(signals); signo++) {
+ const char *name = signals[signo];
+ if (name[0])
+ puts(name);
+ }
+ exit(EXIT_SUCCESS);
+}