colima: fix KeepAlive to prevent process accumulation on macOS
Change KeepAlive from boolean true to SuccessfulExit dictionary in the LaunchAgent configuration. When colima fails to start (e.g., disk already attached), the boolean true setting causes launchd to immediately restart it, spawning orphaned limactl usernet processes with each restart. Using SuccessfulExit = true ensures the service only restarts on clean exits (exit code 0), preventing the aggressive restart loop that accumulates orphaned processes.
This commit is contained in:
parent
6c4fdbe1ad
commit
b3f43db171
2 changed files with 7 additions and 2 deletions
|
|
@ -202,7 +202,9 @@ in
|
|||
"--activate=${if profile.isActive then "true" else "false"}"
|
||||
"--save-config=false"
|
||||
];
|
||||
KeepAlive = true;
|
||||
KeepAlive = {
|
||||
SuccessfulExit = true;
|
||||
};
|
||||
RunAtLoad = true;
|
||||
EnvironmentVariables.PATH = lib.makeBinPath [
|
||||
cfg.package
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@
|
|||
<string>@colima@/bin:@perl@/bin:@docker@/bin:@openssh@/bin:@coreutils@/bin:@curl@/bin:@bashNonInteractive@/bin:@DarwinTools@/bin</string>
|
||||
</dict>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<dict>
|
||||
<key>SuccessfulExit</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.colima-default</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue