Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

posix has no way to trap all possible signals #45

@matu3ba

Description

@matu3ba
# see https://unix.stackexchange.com/questions/520035/exit-trap-with-posix
# Using signal numbers as complete solution is not portable and listing all signal
# names is ugly/unreadable
CWD=$(pwd)
trap "cd ${CWD}" EXIT HUP INT QUIT SIGSEGV TERM

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