Skip to content
This repository was archived by the owner on Dec 31, 2019. It is now read-only.
This repository was archived by the owner on Dec 31, 2019. It is now read-only.

killing process with -9 flag could cause file corruption. #239

@FredericGuilbault

Description

@FredericGuilbault

kill with -15 is the proper way to tell a program finish what it is doing and shutdown , -9 is only for process that does not respond.

This guy explain it better then me :

The SIGTERM signal tells the process that it should perform it’s shutdown proceedures to terminate the process cleanly by closing all log files, connections, etc.

Unlike SIGTERM the SIGKILL signal cannot be captured by the process and thus it cannot be ignored. The SIGKILL signal is handled outside of the process completely, and is used to stop the process immediately. The problem with using SIGKILL is that it does not allow an application to close its open files or database connections cleanly and over time could cause other issues; therefor it is generally better to reserve the SIGKILL signal as a last resort.

Sauce:
https://bencane.com/2014/04/01/understanding-the-kill-command-and-how-to-terminate-processes-in-linux/

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