Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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
Appearance settings

Fix blocking reads from System.in in command line execution#308

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

Draft
Copilot wants to merge4 commits intomaster
base:master
Choose a base branch
Loading
fromcopilot/poll-data-from-input-stream

Conversation

Copy link
Contributor

CopilotAI commentedNov 9, 2025
edited
Loading

Command line execution blocks indefinitely when using System.in due toStreamFeeder performing blockingread() operations. This applies the same fix as maven-shared-utilsMSHARED-1072.

Changes

  • NewStreamPollFeeder class: PollsInputStream.available() before reading, with 100ms wait intervals when no data is available
  • CommandLineUtils updated: UsesStreamPollFeeder instead ofStreamFeeder for feeding system input to process output streams
  • StreamFeeder deprecated: Kept for backward compatibility with clear migration path

Technical approach

The blocking behavior occurs becauseStreamFeeder.read() waits indefinitely for input:

// Old: blocks forever on System.inintdata =input.read();

New approach polls for available data:

// New: non-blocking poll with timeoutif (input.available() >0) {inti =input.read(buf);output.write(buf,0,i);output.flush();}else {lock.wait(100);// Poll every 100ms}
Original prompt

This section details on the original issue you should resolve

<issue_title>Poll data from input stream</issue_title>
<issue_description>In order to fix blocking command line execution with leveraging system input stream the same fix applied tohttps://github.com/apache/maven-shared-utils/pull/140/files (https://issues.apache.org/jira/browse/MSHARED-1072) should be done for plexus-utils as well.</issue_description>

Comments on the Issue (you are@copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.

CopilotAIand others added3 commitsNovember 9, 2025 12:22
Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>
Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>
Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>
CopilotAI changed the title[WIP] Fix blocking command line execution in plexus-utilsFix blocking reads from System.in in command line executionNov 9, 2025
Copilot finished work on behalf ofslachiewiczNovember 9, 2025 12:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@slachiewiczslachiewiczAwaiting requested review from slachiewicz

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Poll data from input stream

2 participants

@slachiewicz

[8]ページ先頭

©2009-2025 Movatter.jp