diff options
| author | Charlie Vieth <charlie.vieth@gmail.com> | 2024-04-13 01:58:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 14:58:11 +0900 |
| commit | 3c877c504b6102daf5dcc1083b1f1a7db88d304c (patch) | |
| tree | 7072b889071948a6bfb6d980d43367745a37490f /src/tui | |
| parent | 892d1acccb705e5547be1b3b6fad8b6d480c290b (diff) | |
| download | fzf-3c877c504b6102daf5dcc1083b1f1a7db88d304c.tar.gz | |
Enable profiling options when 'pprof' tag is set (#2813)
This commit enables cpu, mem, block, and mutex profling of the FZF
executable. To support flushing the profiles at program exit it adds
util.AtExit to register "at exit" functions and mandates that util.Exit
is used instead of os.Exit to stop the program.
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'src/tui')
| -rw-r--r-- | src/tui/light_unix.go | 2 | ||||
| -rw-r--r-- | src/tui/tui.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tui/light_unix.go b/src/tui/light_unix.go index 46188869..55e2b246 100644 --- a/src/tui/light_unix.go +++ b/src/tui/light_unix.go @@ -58,7 +58,7 @@ func openTtyIn() *os.File { } } fmt.Fprintln(os.Stderr, "Failed to open "+consoleDevice) - os.Exit(2) + util.Exit(2) } return in } diff --git a/src/tui/tui.go b/src/tui/tui.go index ad65e92f..aec80fcd 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -678,7 +678,7 @@ func NoColorTheme() *ColorTheme { func errorExit(message string) { fmt.Fprintln(os.Stderr, message) - os.Exit(2) + util.Exit(2) } func init() { |
