MCPcopy Create free account
hub / github.com/efficientgo/e2e / RunUntilSignal

Function RunUntilSignal

interactive/interactive.go:93–99  ·  view source on GitHub ↗

RunUntilSignal stops the current goroutine execution and watches for SIGINT, SIGKILL and SIGHUP signals. Once spotted it continues the execution. This function is useful when you want to interact with e2e tests and manually decide when to finish.

()

Source from the content-addressed store, hash-verified

91// RunUntilSignal stops the current goroutine execution and watches for SIGINT, SIGKILL and SIGHUP signals. Once spotted it continues
92// the execution. This function is useful when you want to interact with e2e tests and manually decide when to finish.
93func RunUntilSignal() {
94 s := make(chan os.Signal, 1)
95 signal.Notify(s, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
96
97 fmt.Println("Waiting for user SIGINT, SIGKILL or SIGHUP signal (Ctrl+C or IDE stop)")
98 <-s
99}

Callers 1

TestRunUtilSignalFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRunUtilSignalFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…