Skip to content

Signal example should use syscall.SIGTERM instead of os.Kill #45

@nathany

Description

@nathany

Regarding the documented signals example, os.Kill can't be caught, it's just there for killing other processes.

os.Kill is like kill -9 which kills a process immediately

syscall.SIGTERM is equivalent to kill which allows the process time to cleanup

signal.Notify(sigchan, os.Interrupt, syscall.SIGTERM)

ref: #9

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