mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-17 08:00:32 +00:00
Make improvements
- Get threads working on NetBSD - Get threads working on OpenBSD - Fix Emacs config for Emacs v28 - Improve --strace logging of sigset_t - Improve --strace logging of struct stat - Improve memory safety of DescribeThing functions - Refactor auto stack allocation into LIBC_RUNTIME - Introduce shell.com example which works on Windows - Refactor __strace_thing into DescribeThing functions - Document the CHECK macros and improve them in NDEBUG mode - Rewrite MAP_STACK so it uses FreeBSD behavior across platforms - Deprecate and discourage the use of MAP_GROWSDOWN (it's weird)
This commit is contained in:
parent
dd9ab01d25
commit
e7611a8476
101 changed files with 967 additions and 464 deletions
|
@ -353,10 +353,7 @@
|
|||
(add-hook 'asm-mode-hook 'cosmo-asm-supplemental-hook)
|
||||
(setq asm-font-lock-keywords cosmo-asm-font-lock-keywords))
|
||||
|
||||
;; Make -*-unix-assembly-*- mode line work correctly.
|
||||
;; TODO(jart): Would be nice to use GitHub's name instead of changing asm-mode.
|
||||
(defun unix-assembly-mode ()
|
||||
(interactive)
|
||||
(asm-mode))
|
||||
;; Make -*-unix-assembly-*- mode line work correctly like GitHub.
|
||||
(define-derived-mode unix-assembly-mode asm-mode "UNIX Assembly")
|
||||
|
||||
(provide 'cosmo-asm-mode)
|
||||
|
|
|
@ -6785,14 +6785,19 @@ static uint32_t WindowsReplThread(void *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void InstallSignalHandler(int sig, void *handler) {
|
||||
struct sigaction sa = {.sa_sigaction = handler};
|
||||
CHECK_NE(-1, sigaction(sig, &sa, 0));
|
||||
}
|
||||
|
||||
static void SigInit(void) {
|
||||
xsigaction(SIGINT, OnInt, 0, 0, 0);
|
||||
xsigaction(SIGHUP, OnHup, 0, 0, 0);
|
||||
xsigaction(SIGTERM, OnTerm, 0, 0, 0);
|
||||
xsigaction(SIGCHLD, OnChld, 0, 0, 0);
|
||||
xsigaction(SIGUSR1, OnUsr1, 0, 0, 0);
|
||||
xsigaction(SIGUSR2, OnUsr2, 0, 0, 0);
|
||||
xsigaction(SIGPIPE, SIG_IGN, 0, 0, 0);
|
||||
InstallSignalHandler(SIGINT, OnInt);
|
||||
InstallSignalHandler(SIGHUP, OnHup);
|
||||
InstallSignalHandler(SIGTERM, OnTerm);
|
||||
InstallSignalHandler(SIGCHLD, OnChld);
|
||||
InstallSignalHandler(SIGUSR1, OnUsr1);
|
||||
InstallSignalHandler(SIGUSR2, OnUsr2);
|
||||
InstallSignalHandler(SIGPIPE, SIG_IGN);
|
||||
/* TODO(jart): SIGXCPU and SIGXFSZ */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue