Skip to content

Why set launched.agents...KeepAlive.Crashed = false #308

@DYnamoX513

Description

@DYnamoX513

In hm module:

Crashed = false;

causes activate-agent rescheduled every 10 seconds.

$ launchctl print gui/501/org.nix-community.home.activate-agenix                                                                                                                                                                                 
gui/501/org.nix-community.home.activate-agenix = {
        path = /Users/pluto/Library/LaunchAgents/org.nix-community.home.activate-agenix.plist
        type = LaunchAgent
        state = spawn scheduled
        minimum runtime = 10
        exit timeout = 5
        runs = 640 #<<------------ two hours after system reboot
        last exit code = 0
        semaphores = {
                successful exit => 0
                after crash => 0
        }
        spawn type = background (5)
        ...

According to man launchd.plist

Crashed <boolean>
If true, the job will be restarted as long as it exited due to a signal which is typically associated with a crash (SIGILL, SIGSEGV, etc.). If false, the job will be restarted in the inverse condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions