- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 62 for sa_handler (0.31 sec)
-
src/cmd/cgo/internal/testsanitizers/testdata/tsan8.go
struct sigaction prev_sa; void forwardSignal(int signo, siginfo_t *info, void *context) { // One of sa_sigaction and/or sa_handler if ((prev_sa.sa_flags&SA_SIGINFO) != 0) { prev_sa.sa_sigaction(signo, info, context); return; } if (prev_sa.sa_handler != SIG_IGN && prev_sa.sa_handler != SIG_DFL) { prev_sa.sa_handler(signo); return; } fprintf(stderr, "No Go handler to forward to!\n"); abort(); }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.3K bytes - Viewed (0) -
src/runtime/cgo/gcc_freebsd_sigaction.c
memset(&act, 0, sizeof act); memset(&oldact, 0, sizeof oldact); if (goact) { if (goact->flags & SA_SIGINFO) { act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler); } else { act.sa_handler = (void(*)(int))(goact->handler); } sigemptyset(&act.sa_mask); for (i = 0; i < 8 * sizeof(goact->mask); i++) { if (goact->mask.__bits[i/32] & ((uint32_t)(1)<<(i&31))) { sigaddset(&act.sa_mask, i+1); }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 24 22:38:02 UTC 2023 - 2K bytes - Viewed (0) -
src/runtime/os_freebsd2.go
var sa sigactiont sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTART sa.sa_mask = sigset_all if fn == abi.FuncPCABIInternal(sighandler) { // abi.FuncPCABIInternal(sighandler) matches the callers in signal_unix.go fn = abi.FuncPCABI0(sigtramp) } sa.sa_handler = fn sigaction(i, &sa, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 603 bytes - Viewed (0) -
src/runtime/cgo/gcc_sigaction.c
memset(&act, 0, sizeof act); memset(&oldact, 0, sizeof oldact); if (goact) { if (goact->flags & SA_SIGINFO) { act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler); } else { act.sa_handler = (void(*)(int))(goact->handler); } sigemptyset(&act.sa_mask); for (i = 0; i < 8 * sizeof(goact->mask); i++) { if (goact->mask & ((uint64_t)(1)<<i)) { sigaddset(&act.sa_mask, (int)(i+1)); } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 24 22:38:02 UTC 2023 - 2.1K bytes - Viewed (0) -
src/runtime/defs_arm_linux.go
#include <asm/siginfo.h> #include <linux/time.h> struct xsiginfo { int si_signo; int si_errno; int si_code; char _sifields[4]; }; #undef sa_handler #undef sa_flags #undef sa_restorer #undef sa_mask struct xsigaction { void (*sa_handler)(void); unsigned long sa_flags; void (*sa_restorer)(void); unsigned int sa_mask; // mask last for extensibility }; */ import "C" const (
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 2.7K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/catchpanic.go
#include <string.h> static void abrthandler(int signum) { if (signum == SIGABRT) { exit(0); // success } } void registerAbortHandler() { struct sigaction act; memset(&act, 0, sizeof act); act.sa_handler = abrthandler; sigaction(SIGABRT, &act, NULL); } static void __attribute__ ((constructor)) sigsetup(void) { if (getenv("CGOCATCHPANIC_EARLY_HANDLER") == NULL) return; registerAbortHandler(); } */
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 993 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/tsan11.go
static void raise_usr2(int signo) { raise(SIGUSR2); } static void register_handler(int signo) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_flags = SA_ONSTACK; sa.sa_handler = raise_usr2; if (sigaction(SIGUSR1, &sa, NULL) != 0) { perror("failed to register SIGUSR1 handler"); exit(EXIT_FAILURE); } } */ import "C" func main() { ch := make(chan os.Signal, 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/main_unix.c
sa.sa_flags = SA_ONSTACK | SA_SIGINFO; memset(&osa, 0, sizeof osa); sigemptyset(&osa.sa_mask); if (sigaction(SIGSEGV, &sa, &osa) < 0) { perror("sigaction"); return 2; } if (osa.sa_handler == SIG_DFL) { fprintf(stderr, "Go runtime did not install signal handler\n"); return 2; } // gccgo does not set SA_ONSTACK for SIGSEGV. if (getenv("GCCGO") == NULL && (osa.sa_flags&SA_ONSTACK) == 0) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.4K bytes - Viewed (0) -
src/runtime/defs_linux_loong64.go
} const ( _O_RDONLY = 0x0 _O_WRONLY = 0x1 _O_CREAT = 0x40 _O_TRUNC = 0x200 _O_NONBLOCK = 0x800 _O_CLOEXEC = 0x80000 ) type sigactiont struct { sa_handler uintptr sa_flags uint64 sa_mask uint64 // Linux on loong64 does not have the sa_restorer field, but the setsig // function references it (for x86). Not much harm to include it at the end. sa_restorer uintptr
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 3.4K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/sigfwd.go
} } static void __attribute__ ((constructor)) sigsetup(void) { if (getenv("GO_TEST_CGOSIGFWD") == NULL) { return; } struct sigaction act; memset(&act, 0, sizeof act); act.sa_handler = segvhandler; sigaction(SIGSEGV, &act, NULL); } */ import "C" func init() { register("CgoSigfwd", CgoSigfwd) } var nilPtr *byte func f() (ret bool) { defer func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 01 17:06:49 UTC 2022 - 1.6K bytes - Viewed (0)