Skip to content

signal.signal should not be used in library code #67

@Song-Zhiyi

Description

@Song-Zhiyi

at alibabacloud_credentials/provider/ecs_ram_role.py:73-74

signal.signal() is used to register cleanup hooks for ram role rotation service.

It will add unexpected behavior to end user's application as library code is touching a global resource (the signal handling routines).
It is messing up with user's own signal handling logics.

Please avoid hooking into signals in library code, this is anti-pattern in library code.

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