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

fix: remove SIGWINCH listener upon closing the REPL #2205

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Snehil-Shah
Copy link
Member

Description

What is the purpose of this pull request?

This pull request:

  • Removes SIGWINCH event listener when the REPL is closed to avoid dangling instances in [process]
  • Fixes:
    image

Questions

Any questions for reviewers of this pull request?

I am a bit confused. Should we also remove all other listeners (like 'SIGINT' events etc) in onClose() or are they automatically removed?

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kgryte
Copy link
Member

kgryte commented Apr 26, 2024

I am a bit confused. Should we also remove all other listeners (like 'SIGINT' events etc) in onClose() or are they automatically removed?

No need to remove the rli listeners, as the rli instance is garbage collected along with the REPL. For istream, this may live longer than the REPL instance, and the proc most certainly so. In the latter cases, it makes sense to clean up after ourselves to avoid holding on to function/callback references.

@kgryte kgryte added the REPL Issue or pull request specific to the project REPL. label Apr 26, 2024
@kgryte kgryte merged commit 20f7d59 into stdlib-js:develop Apr 26, 2024
6 checks passed
@Snehil-Shah Snehil-Shah deleted the patch-listener branch April 26, 2024 12:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
REPL Issue or pull request specific to the project REPL.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants