mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
uucore fix NetBSD build.
This commit is contained in:
parent
fc14c6e7a9
commit
36561c9526
1 changed files with 45 additions and 0 deletions
|
@ -78,6 +78,51 @@ pub static ALL_SIGNALS: [&str; 32] = [
|
||||||
"XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "INFO", "USR1", "USR2",
|
"XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "INFO", "USR1", "USR2",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
The following signals are defined in NetBSD:
|
||||||
|
|
||||||
|
SIGHUP 1 Hangup
|
||||||
|
SIGINT 2 Interrupt
|
||||||
|
SIGQUIT 3 Quit
|
||||||
|
SIGILL 4 Illegal instruction
|
||||||
|
SIGTRAP 5 Trace/BPT trap
|
||||||
|
SIGABRT 6 Abort trap
|
||||||
|
SIGEMT 7 EMT trap
|
||||||
|
SIGFPE 8 Floating point exception
|
||||||
|
SIGKILL 9 Killed
|
||||||
|
SIGBUS 10 Bus error
|
||||||
|
SIGSEGV 11 Segmentation fault
|
||||||
|
SIGSYS 12 Bad system call
|
||||||
|
SIGPIPE 13 Broken pipe
|
||||||
|
SIGALRM 14 Alarm clock
|
||||||
|
SIGTERM 15 Terminated
|
||||||
|
SIGURG 16 Urgent I/O condition
|
||||||
|
SIGSTOP 17 Suspended (signal)
|
||||||
|
SIGTSTP 18 Suspended
|
||||||
|
SIGCONT 19 Continued
|
||||||
|
SIGCHLD 20 Child exited, stopped or continued
|
||||||
|
SIGTTIN 21 Stopped (tty input)
|
||||||
|
SIGTTOU 22 Stopped (tty output)
|
||||||
|
SIGIO 23 I/O possible
|
||||||
|
SIGXCPU 24 CPU time limit exceeded
|
||||||
|
SIGXFSZ 25 File size limit exceeded
|
||||||
|
SIGVTALRM 26 Virtual timer expired
|
||||||
|
SIGPROF 27 Profiling timer expired
|
||||||
|
SIGWINCH 28 Window size changed
|
||||||
|
SIGINFO 29 Information request
|
||||||
|
SIGUSR1 30 User defined signal 1
|
||||||
|
SIGUSR2 31 User defined signal 2
|
||||||
|
SIGPWR 32 Power fail/restart
|
||||||
|
*/
|
||||||
|
|
||||||
|
#[cfg(target_os = "netbsd")]
|
||||||
|
pub static ALL_SIGNALS: [&str; 33] = [
|
||||||
|
"EXIT", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "EMT", "FPE", "KILL", "BUS", "SEGV",
|
||||||
|
"SYS", "PIPE", "ALRM", "TERM", "URG", "STOP", "TSTP", "CONT", "CHLD", "TTIN", "TTOU", "IO",
|
||||||
|
"XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "INFO", "USR1", "USR2", "PWR"
|
||||||
|
];
|
||||||
|
|
||||||
pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
|
pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
|
||||||
if let Ok(value) = signal_name_or_value.parse() {
|
if let Ok(value) = signal_name_or_value.parse() {
|
||||||
if is_signal(value) {
|
if is_signal(value) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue