Skip to content

better to fail startup than auto-kill other running instances #324

@jonassmedegaard

Description

@jonassmedegaard

I stumbled upon #167 and that sems bad design to me: Normal behavior of daemons is to simply refuse to start if a pidfile exist and the referenced PID is alive.

It seems you wanted the forceful startup specifically for certain deployment scripts. I urge you to consider removing this functionality from atomic-server and instead handle such unusual forceful treatment of pre-existing processes e.g. by having your deployment script do a killall atomic-server && sleep 2 || true before starting atomic-server.

Reason I stumbled upon #167 was that I wondered why heim was used. If you insist that forceful startup should be implemented in atomic-server itself, then at least consider moving to a more lightweight library for that - e.g. sysinfo. I have zero experience programming in Rust, so only mention that alternative because others seem to recommend it, both at stackoverflow and users.rust-lang.org.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions