- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 55 for sa_handler (0.33 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/os_freebsd_amd64.go
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 if iscgo { fn = abi.FuncPCABI0(cgoSigtramp) } else { fn = abi.FuncPCABI0(sigtramp) } } sa.sa_handler = fn sigaction(i, &sa, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 21 22:40:36 UTC 2021 - 658 bytes - Viewed (0) -
build/pause/linux/pause.c
fprintf(stderr, "Warning: pause should be the first process\n"); if (sigaction(SIGINT, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0) return 1; if (sigaction(SIGTERM, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0) return 2; if (sigaction(SIGCHLD, &(struct sigaction){.sa_handler = sigreap, .sa_flags = SA_NOCLDSTOP}, NULL) < 0) return 3;
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 26 13:26:24 UTC 2020 - 1.8K 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)