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

Refactor Child.main to handle EOF #631

Merged
merged 1 commit into from
Feb 6, 2018
Merged

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Feb 5, 2018

I've seen child processes being left over after quitting Neovim, looping
in read().
This appears to fix it.

Maybe this is what #625
tried to address also?!

self._unpacker.feed(sys.stdin.buffer.read(1))
return self._unpacker
while True:
feed = sys.stdin.buffer.raw.read(102400)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This also reads up to 100kb (I am seeing ~10kb at minimum here).
Reading this byte per byte seems to be very wasteful.

@Shougo
Copy link
Owner

Shougo commented Feb 5, 2018

It is very big change.
It needs to be testing.

I will test it later.

@Shougo
Copy link
Owner

Shougo commented Feb 5, 2018

More testers are needed.

I've seen child processes being left over after quitting Neovim, looping
in `read()`.
This appears to fix it.

Maybe this is what Shougo#625
tried to address also?!
@lambdalisue
Copy link

I haven't test yet but code looks quite simple and efficient. LGTM

@Shougo
Copy link
Owner

Shougo commented Feb 6, 2018

I will test it later.
Please wait.

@Shougo
Copy link
Owner

Shougo commented Feb 6, 2018

It seems works.

I will merge it later.

@Shougo Shougo merged commit 41ed646 into Shougo:master Feb 6, 2018
@Shougo
Copy link
Owner

Shougo commented Feb 6, 2018

Merged.

@blueyed blueyed mentioned this pull request Feb 7, 2018
@blueyed blueyed deleted the child-eof branch February 7, 2018 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants