Skip to content
New issue

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

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

Already on GitHub? # to your account

Threads Signal Handling Hack #79

Open
CMCDragonkai opened this issue Dec 1, 2021 · 0 comments
Open

Threads Signal Handling Hack #79

CMCDragonkai opened this issue Dec 1, 2021 · 0 comments
Labels
development Standard development r&d:polykey:supporting activity Supporting core activity

Comments

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Dec 1, 2021

Specification

Any entrypoint to the Polykey-Desktop application must do this at the beginning:

/**
 * Hack for wiping out the threads signal handlers
 * See: https://github.com/andywer/threads.js/issues/388
 * This is done statically during this import
 * It is essential that the threads import here is very first import of threads module
 * in the entire codebase for this hack to work
 * If the worker manager is used, it must be stopped gracefully with the PolykeyAgent
 */
import 'threads';
process.removeAllListeners('SIGINT');
process.removeAllListeners('SIGTERM');

If it is expected that process context needs to import PolykeyAgent or really any transitive import of @matrixai/db or threads.

When the signal handlers are removed from upstream, this hack can be removed from Polykey and Polykey-Desktop.

Additional context

Tasks

  1. ...
  2. ...
  3. ...
@CMCDragonkai CMCDragonkai added the development Standard development label Dec 1, 2021
@CMCDragonkai CMCDragonkai added r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:core activity 4 End to End Networking behind Consumer NAT Devices r&d:polykey:core activity 3 Peer to Peer Federated Hierarchy r&d:polykey:core activity 2 Cross Platform Cryptography for JavaScript Platforms and removed r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:core activity 4 End to End Networking behind Consumer NAT Devices r&d:polykey:core activity 3 Peer to Peer Federated Hierarchy r&d:polykey:core activity 2 Cross Platform Cryptography for JavaScript Platforms labels Jul 23, 2022
@CMCDragonkai CMCDragonkai self-assigned this Jul 10, 2023
@CMCDragonkai CMCDragonkai added the r&d:polykey:supporting activity Supporting core activity label Jul 10, 2023
@CMCDragonkai CMCDragonkai removed their assignment Sep 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
development Standard development r&d:polykey:supporting activity Supporting core activity
Development

No branches or pull requests

1 participant