Skip to content

Write daemon PID to /var/run/{progName} on Linux #20

@aaronpburke

Description

@aaronpburke

I'm noticing inconsistent behavior between Linux distributions.

On Ubuntu/Debian, using the same (standard) SysVinit script, "service {name} stop" does not function as intended. The daemon is never killed during a stop() command. After much debugging, I've found that adding the final PID to /var/run{progName} corrects the stop() behavior.

On RedHat/CentOS, everything works as expected.

Of course, this likely comes down to differences in fallback mechanisms between the two distributions when the .pid file isn't present, but having a .pid file would go a long way to ensuring compatibility across Linux distributions.

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