Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Ensure onStdinClose only completes for non-tty streams#1665

Open
mcrumm wants to merge3 commits intosass:main
base:main
Choose a base branch
Loading
frommcrumm:mc-stdin-tty

Conversation

mcrumm
Copy link
Contributor

First, thank you so much for all the work to get#1411 merged! I realized only too late that there was a small typo in my initial version that has led to a bit of a gnarly bug. 😳

The initial stdin commit144cd35 inverted the TTY conditional
b/w theio/node andio/vm implementations ofonStdinClose.
The node implementation incorrectly checked for the presence
of TTY to complete the stream, while the vm implementation
correctly checked for itsabsence. The commit that landed
upstreamc7ab426 normalized the incorrect behaviour, which
means that sass was still not closing when stdin was closed,
unless stdin was a TTY.

Unfortunately that created a "worst of both worlds" situation
because programs that start sass and then close unexpectedly
will still leave zombie sass processes running in the
background, and wrapper scripts designed to mitigate this
exact problem will stop working because moving the process to
the background now incorrectly causes the job to stop.

This change ensures we only complete the CancelableOperation
onStdinClose for non-tty standard input streams.

The initial stdin commit144cd35 inverted the TTY conditionalb/w the io/node and io/vm implementations of onStdinClose.The node implementation incorrectly checked for the presenceof TTY to complete the stream, while the vm implementationcorrectly checked for its absence. The commit that landedupstreamc7ab426 normalized the incorrect behaviour, whichmeans that sass was still not closing when stdin was closed,unless stdin was a TTY.Unfortunately that created a "worst of both worlds" situationbecause programs that start sass and then close unexpectedlywill still leave zombie sass processes running in thebackground, and wrapper scripts designed to mitigate thisexact problem will stop working because moving the process tothe background now incorrectly causes the job to stop.This change ensures we only complete the CancelableOperationonStdinClose for non-tty standard input streams.
@nex3nex3 self-requested a reviewApril 11, 2022 20:31
@nex3
Copy link
Contributor

Can you add a changelog entry as well?

mcrumm reacted with thumbs up emoji

@nex3
Copy link
Contributor

Thanks! Are you able to figure out why the Windows tests are failing? It seems unlikely to be a flake.

@mcrumm
Copy link
ContributorAuthor

@nex3 I can test Windows in a VM which is not ideal but it works :) I agree there's an issue and I will try to figure it out– right now runningdart test from PowerShell hangs forever on a--watch test.

@nex3
Copy link
Contributor

@mcrumm If you don't have time to debug this for now, maybe we should roll back#1411 for now?

@mcrumm
Copy link
ContributorAuthor

@nex3 Yes I think that's likely the best course. Other responsibilities have unfortunately taken precedence for the moment, but I would very much like to get back to this as time permits :)

Copy link
Contributor

@nex3nex3 left a comment

Choose a reason for hiding this comment

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

Marking as Request Changes pending the windows debugging.

mcrumm reacted with thumbs up emoji
@nex3nex3force-pushed themain branch 2 times, most recently from9cff4ca to6c59213CompareJuly 21, 2023 01:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nex3nex3nex3 requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mcrumm@nex3

[8]ページ先頭

©2009-2025 Movatter.jp