Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OS Signals #1030

Open
iacore opened this issue Sep 14, 2022 · 6 comments
Open

Support OS Signals #1030

iacore opened this issue Sep 14, 2022 · 6 comments

Comments

@iacore
Copy link
Contributor

iacore commented Sep 14, 2022

Currently, pressing Ctrl+C will abort all threads directly. Ideally, the user should be able to handle SIGINT and other signals gracefully.

@iacore
Copy link
Contributor Author

iacore commented Sep 16, 2022

I made a library for this: https://git.envs.net/iacore/janet-signal. I hard coded the signal numbers, so it may only be used on Linux.

This is only a prototype. Not sure how to get signal numbers consistentyl on other platforms other than having accompanied C code.

@sogaiu
Copy link
Contributor

sogaiu commented Sep 16, 2022

Currently I get a 404 for: https://git.envs.net/iacore/janet-signal

@iacore
Copy link
Contributor Author

iacore commented Sep 16, 2022

I set it to private. Now it should be visible to all.

@sogaiu
Copy link
Contributor

sogaiu commented Sep 17, 2022

Works here now, thanks :)

@amano-kenji
Copy link
Contributor

Should it be closed? Janet has os/sigaction.

@iacore
Copy link
Contributor Author

iacore commented Jan 30, 2024

No. POSIX has more signal-related API than sigaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants