Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 506 for signalM (0.13 sec)

  1. src/runtime/testdata/testprognet/signalexec.go

    // This is in testprognet instead of testprog because testprog
    // must not import anything (like net, but also like os/signal)
    // that kicks off background goroutines during init.
    
    package main
    
    import (
    	"fmt"
    	"os"
    	"os/exec"
    	"os/signal"
    	"sync"
    	"syscall"
    	"time"
    )
    
    func init() {
    	register("SignalDuringExec", SignalDuringExec)
    	register("Nop", Nop)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  2. src/os/signal/signal_plan9_test.go

    // license that can be found in the LICENSE file.
    
    package signal
    
    import (
    	"internal/itoa"
    	"os"
    	"runtime"
    	"syscall"
    	"testing"
    	"time"
    )
    
    func waitSig(t *testing.T, c <-chan os.Signal, sig os.Signal) {
    	select {
    	case s := <-c:
    		if s != sig {
    			t.Fatalf("signal was %v, want %v", s, sig)
    		}
    	case <-time.After(1 * time.Second):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Mar 14 17:56:50 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testcarchive/testdata/main4.c

    		die("sigaction");
    	}
    }
    
    // Test raising SIGIO on a C thread with an alternate signal stack
    // when there is a Go signal handler for SIGIO.
    static void* thread1(void* arg __attribute__ ((unused))) {
    	stack_t ss;
    	int i;
    	stack_t nss;
    	struct timespec ts;
    
    	// Set up an alternate signal stack for this thread.
    	memset(&ss, 0, sizeof ss);
    	ss.ss_sp = malloc(CSIGSTKSZ);
    	if (ss.ss_sp == NULL) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  4. src/os/signal/example_unix_test.go

    //go:build unix
    
    package signal_test
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"os"
    	"os/signal"
    )
    
    var neverReady = make(chan struct{}) // never closed
    
    // This example passes a context with a signal to tell a blocking function that
    // it should abandon its work after a signal is received.
    func ExampleNotifyContext() {
    	ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
    	defer stop()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 15:34:56 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  5. src/os/signal/signal_unix.go

    //go:build unix || (js && wasm) || wasip1 || windows
    
    package signal
    
    import (
    	"os"
    	"syscall"
    )
    
    // Defined by the runtime package.
    func signal_disable(uint32)
    func signal_enable(uint32)
    func signal_ignore(uint32)
    func signal_ignored(uint32) bool
    func signal_recv() uint32
    
    func loop() {
    	for {
    		process(syscall.Signal(signal_recv()))
    	}
    }
    
    func init() {
    	watchSignalLoop = loop
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:21 UTC 2023
    - 1K bytes
    - Viewed (0)
  6. cni/cmd/install-cni/main.go

    package main
    
    import (
    	"context"
    	"os"
    	"os/signal"
    	"syscall"
    
    	"istio.io/istio/cni/pkg/cmd"
    	"istio.io/istio/pkg/log"
    )
    
    func main() {
    	// Create context that cancels on termination signal
    	ctx, cancel := context.WithCancel(context.Background())
    	sigChan := make(chan os.Signal, 1)
    	signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
    	go func(sigChan chan os.Signal, cancel context.CancelFunc) {
    		sig := <-sigChan
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. src/go/doc/testdata/testing.1.golden

    		failed		bool		// Test or benchmark has failed.
    		start		time.Time	// Time test or benchmark started
    		duration	time.Duration
    		self		any		// To be sent on signal channel when done.
    		signal		chan any	// Output for serial tests.
    	}
    
    	// Error is equivalent to Log() followed by Fail(). 
    	func (c *common) Error(args ...any)
    
    	// Errorf is equivalent to Logf() followed by Fail(). 
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 8.4K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testsanitizers/testdata/tsan12.go

    // libc interceptor that writes signal handlers to a global variable within the
    // TSAN runtime instead of making a sigaction system call. A bug in
    // syscall.runtime_AfterForkInChild corrupted TSAN's signal forwarding table
    // during calls to (*os/exec.Cmd).Run, causing the parent process to fail to
    // invoke signal handlers.
    
    import (
    	"fmt"
    	"os"
    	"os/exec"
    	"os/signal"
    	"syscall"
    )
    
    import "C"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 929 bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/filters/watch_termination_test.go

    			switch {
    			case test.signalAttachedToContext:
    				if test.signal == nil || test.signal != signalGot {
    					t.Errorf("expected request context to have server shutdown signal: %p, but got: %p", test.signal, signalGot)
    				}
    			default:
    				if signalGot != nil {
    					t.Errorf("expected request context to not have server shutdown signal: %p, but got: %p", test.signal, signalGot)
    				}
    			}
    			if test.wg == nil {
    				return
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 15:49:49 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  10. src/os/exec_plan9.go

    	"runtime"
    	"syscall"
    	"time"
    )
    
    // The only signal values guaranteed to be present in the os package
    // on all systems are Interrupt (send the process an interrupt) and
    // Kill (force the process to exit). Interrupt is not implemented on
    // Windows; using it with [os.Process.Signal] will return an error.
    var (
    	Interrupt Signal = syscall.Note("interrupt")
    	Kill      Signal = syscall.Note("kill")
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top