Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 460 for signalfd (0.13 sec)

  1. src/runtime/testdata/testprogcgo/eintr.go

    		}
    	}
    	return r1, r2
    }
    
    // winch sends a few SIGWINCH signals to the process.
    func winch() {
    	ticker := time.NewTicker(100 * time.Microsecond)
    	defer ticker.Stop()
    	pid := syscall.Getpid()
    	for n := 10; n > 0; n-- {
    		syscall.Kill(pid, syscall.SIGWINCH)
    		<-ticker.C
    	}
    }
    
    // sendSomeSignals triggers a few SIGURG and SIGWINCH signals.
    func sendSomeSignals() {
    	done := make(chan struct{})
    	go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testsanitizers/testdata/tsan9.go

    // license that can be found in the LICENSE file.
    
    package main
    
    // This program failed when run under the C/C++ ThreadSanitizer. The
    // TSAN library was not keeping track of whether signals should be
    // delivered on the alternate signal stack, and the Go signal handler
    // was not preserving callee-saved registers from C callers.
    
    /*
    #cgo CFLAGS: -g -fsanitize=thread
    #cgo LDFLAGS: -g -fsanitize=thread
    
    #include <stdlib.h>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. pkg/util/interrupt/interrupt.go

    	h.once.Do(func() {
    		for _, fn := range h.notify {
    			fn()
    		}
    	})
    }
    
    // Signal is called when an os.Signal is received, and guarantees that all notifications
    // are executed, then the final handler is executed. This function should only be called once
    // per Handler instance.
    func (h *Handler) Signal(s os.Signal) {
    	h.once.Do(func() {
    		for _, fn := range h.notify {
    			fn()
    		}
    		if h.final == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 09:22:35 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  4. src/runtime/cgo/gcc_netbsd.c

    	free(v);
    
    	// On NetBSD, a new thread inherits the signal stack of the
    	// creating thread. That confuses minit, so we remove that
    	// signal stack here before calling the regular mstart. It's
    	// a bit baroque to remove a signal stack here only to add one
    	// in minit, but it's a simple change that keeps NetBSD
    	// working like other OS's. At this point all signals are
    	// blocked, so there is no race.
    	memset(&ss, 0, sizeof ss);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 03:55:51 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. src/runtime/export_unix_test.go

    	ready(mp)
    
    	// Wait for the signal. We use a pipe rather than a note
    	// because write is always async-signal-safe.
    	entersyscallblock()
    	var b byte
    	read(waitForSigusr1.rdpipe, noescape(unsafe.Pointer(&b)), 1)
    	exitsyscall()
    
    	gotM := waitForSigusr1.mID
    	testSigusr1 = nil
    
    	unlockOSThread()
    
    	if b != 0 {
    		// timeout signal from caller
    		return -1, -1
    	}
    	return mp.id, gotM
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 21:27:51 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  6. src/runtime/testdata/testprogcgo/racesig.go

    //go:build unix
    // +build unix
    
    package main
    
    // Test that an external C thread that is calling malloc can be hit
    // with SIGCHLD signals. This used to fail when built with the race
    // detector, because in that case the signal handler would indirectly
    // call the C malloc function.
    
    /*
    #include <errno.h>
    #include <signal.h>
    #include <stdint.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <pthread.h>
    #include <sched.h>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 01:46:05 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/request/server_shutdown_signal.go

    const serverShutdownSignalKey serverShutdownSignalKeyType = iota
    
    // ServerShutdownSignal is associated with the request context so
    // the request handler logic has access to signals rlated to
    // the server shutdown events
    type ServerShutdownSignal interface {
    	// Signaled when the apiserver is not receiving any new request
    	ShuttingDown() <-chan struct{}
    }
    
    // ServerShutdownSignalFrom returns the ServerShutdownSignal instance
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 15:49:30 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  8. pkg/ctrlz/ctrlz_test.go

    		t.Fatal("Timed out waiting for listeningTestProbe to be called")
    	}
    }
    
    func TestSignals(t *testing.T) {
    	c := make(chan os.Signal, 1)
    	signal.Notify(c, syscall.SIGUSR1)
    	server := startAndWaitForServer(t)
    	defer server.Close()
    	reloadURL := fmt.Sprintf("http://%v/signalj/SIGUSR1", server.Address())
    	resp, err := http.DefaultClient.Post(reloadURL, "text/plain", nil)
    	if err != nil {
    		t.Fatalf("Run: %v", err)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 15 18:23:41 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/filters/mux_discovery_complete_test.go

    		{
    			name:                             "no signals, no key in the ctx",
    			expectNoMuxAndDiscoIncompleteKey: true,
    		},
    		{
    			name:                             "signal ready, no key in the ctx",
    			muxAndDiscoveryCompleteSignal:    func() chan struct{} { ch := make(chan struct{}); close(ch); return ch }(),
    			expectNoMuxAndDiscoIncompleteKey: true,
    		},
    		{
    			name:                          "signal not ready, the key in the ctx",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 19 11:26:59 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  10. pkg/windows/service/service.go

    			case svc.Interrogate:
    				s <- c.CurrentStatus
    			case svc.Stop, svc.Shutdown:
    				klog.Infof("Service stopping")
    				// We need to translate this request into a signal that can be handled by the signal handler
    				// handling shutdowns normally (currently apiserver/pkg/server/signal.go).
    				// If we do not do this, our main threads won't be notified of the upcoming shutdown.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 24 11:25:33 UTC 2022
    - 3.3K bytes
    - Viewed (0)
Back to top