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

posix has no way to trap all possible signals #45

Open
matu3ba opened this issue Sep 28, 2022 · 0 comments
Open

posix has no way to trap all possible signals #45

matu3ba opened this issue Sep 28, 2022 · 0 comments

Comments

@matu3ba
Copy link

matu3ba commented Sep 28, 2022

# 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant