less: update line input so that it doesn't interfere with
screen update. Makes "man bash", [enter], [/], <enter search pattern>, [enter] more usable - manpage draws as you enter the pattern! Yay!! less: fix bug where backspace wasn't actually deleting chars less: "examine file with empty name" doesn't abort anymore. libbb: add "all fatal signals" mask. getch_nowait - 207 +207 status_print - 105 +105 examine_file 64 87 +23 move_cursor - 16 +16 m_status_print 185 195 +10 less_main 1656 1663 +7 decode_format_string 790 795 +5 test_main 403 405 +2 process0_stdin 247 249 +2 passwd_main 1070 1072 +2 less_gets 196 178 -18 buffer_print 169 71 -98 less_getch 362 138 -224 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 7/3 up/down: 379/-340) Total: 39 bytes text data bss dec hex filename 798329 740 7484 806553 c4e99 busybox_old 798368 740 7484 806592 c4ec0 busybox_unstripped
This commit is contained in:
@@ -274,9 +274,32 @@ char *xrealloc_getcwd_or_warn(char *cwd);
|
||||
|
||||
char *xmalloc_follow_symlinks(const char *path);
|
||||
|
||||
//enum {
|
||||
// BB_SIGS_FATAL = ,
|
||||
//};
|
||||
enum {
|
||||
/* bb_signals(BB_SIGS_FATAL, handler) catches all signals which
|
||||
* otherwise would kill us, except for those resulting from bugs:
|
||||
* SIGSEGV, SIGILL, SIGFPE.
|
||||
* Other fatal signals not included (TODO?):
|
||||
* SIGBUS Bus error (bad memory access)
|
||||
* SIGPOLL Pollable event. Synonym of SIGIO
|
||||
* SIGPROF Profiling timer expired
|
||||
* SIGSYS Bad argument to routine
|
||||
* SIGTRAP Trace/breakpoint trap
|
||||
*/
|
||||
BB_SIGS_FATAL = 0
|
||||
+ (1 << SIGHUP)
|
||||
+ (1 << SIGINT)
|
||||
+ (1 << SIGTERM)
|
||||
+ (1 << SIGPIPE) // Write to pipe with no readers
|
||||
+ (1 << SIGQUIT) // Quit from keyboard
|
||||
+ (1 << SIGABRT) // Abort signal from abort(3)
|
||||
+ (1 << SIGALRM) // Timer signal from alarm(2)
|
||||
+ (1 << SIGVTALRM) // Virtual alarm clock
|
||||
+ (1 << SIGXCPU) // CPU time limit exceeded
|
||||
+ (1 << SIGXFSZ) // File size limit exceeded
|
||||
+ (1 << SIGUSR1) // Yes kids, these are also fatal!
|
||||
+ (1 << SIGUSR2)
|
||||
+ 0,
|
||||
};
|
||||
void bb_signals(int sigs, void (*f)(int));
|
||||
/* Unlike signal() and bb_signals, sets handler with sigaction()
|
||||
* and in a way that while signal handler is run, no other signals
|
||||
|
Reference in New Issue
Block a user