air
air copied to clipboard
Can't stop Air with Ctrl-C
When I use Air with graceful shutdown in my app, Air can't exit, it waits something for a long time. But my application has completed.
Os: MacOS
Config:
testdata_dir = "tmp/air/testdata"
tmp_dir = "tmp/air"
[build]
bin = "./bin/foo"
cmd = "make bin/foo"
delay = 2000
exclude_dir = ["tmp"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "yaml"]
kill_delay = "2s"
log = "build-errors.log"
send_interrupt = true
stop_on_error = true
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
time = true
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
I have the same problem.
In addition, when kill_delay="0s", Ctrt+C terminates air and my application immediately (no executing jobs to exit gracefully) And when kill_delay="1s", air never terminates even though my application exited normally
fixed
Now it works, but not completely correct. Air waits time, setting in "kill_delay", and then exits. But my application exits early.
For instance: I set 30s to "kill_delay". I push Ctrl-C. My application exits in 1s. But Air waits all 30s and only then exists.
you mean the if you set the kill_delay the right behavior is: set 30s as kill_delay, when your application exits in 5s air not need to wait then to create a new process, right? so It's mean air need to check whether the process is live, wait within 30s, until the process stopped.
@marksartdev
you mean the if you set the kill_delay the right behavior is: set 30s as kill_delay, when your application exits in 5s air not need to wait then to create a new process, right? so It's mean air need to check whether the process is live, wait within 30s, until the process stopped.
@marksartdev
Yes. I mean, Air have to periodically (for instance every 1s) check the process is live or not. If process is live and 30s have passed, Air have to send SIGKILL. But if the process isn't live, air have to stop work and exit.
you mean the if you set the kill_delay the right behavior is: set 30s as kill_delay, when your application exits in 5s air not need to wait then to create a new process, right? so It's mean air need to check whether the process is live, wait within 30s, until the process stopped. @marksartdev
Yes. I mean, Air have to periodically (for instance every 1s) check the process is live or not. If process is live and 30s have passed, Air have to send SIGKILL. But if the process isn't live, air have to stop work and exit.
I think this is a good feature, let me add it