kill: split out from skill/snice

The first part of fixing skill/snice to use the library instead
of directly readdir()ing /proc which is what it does now.

Remove the kill code from the skill/snice code and put common
elements into lib/signals.c Not 100% sure that is the right
destination instead of a new lib file, but ok for now.

kill shares some parsing logic with skill/snice but mainly
around signal specifications. The "do it" code is very different.

Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
Craig Small
2015-09-26 09:13:13 +10:00
parent f37e5eec96
commit f65121ef74
5 changed files with 246 additions and 235 deletions

View File

@ -24,5 +24,13 @@ extern int signal_name_to_number(const char *__restrict name);
extern const char *signal_number_to_name(int signo);
extern int skill_sig_option(int *argc, char **argv);
extern char *strtosig(const char *restrict s);
extern void pretty_print_signals(void);
extern void unix_print_signals(void);
__END_DECLS
#endif