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

javap exec is missuning shared stderr/out #189

Closed
judovana opened this issue Oct 15, 2021 · 2 comments · Fixed by #175
Closed

javap exec is missuning shared stderr/out #189

judovana opened this issue Oct 15, 2021 · 2 comments · Fixed by #175
Assignees

Comments

@judovana
Copy link
Owner

The redirected stdout and err, to capture current stds and then stop capturig them is pure evil.
Any subprocess, which stdout/err we are interested in, should have its own thread-based std readers. I think my AbstractSourceTestClass.java can be refactored, so its base class is just launched process with stderr/out captured. And then launch javap via that.

@judovana
Copy link
Owner Author

ok it does not. Was still sleeping.

But the

      while ((line = reader.readLine()) != null) {
                sb.append(line).append(System.getProperty("line.separator", "\n"));
                javap.waitFor(2, TimeUnit.SECONDS);
            }
        }

        javap.destroy();

is terrible

please replace destroy by waitfor, and remove waitfor from the loop!

@judovana
Copy link
Owner Author

I think the timeout will be redundat then

@AurumTheEnd AurumTheEnd linked a pull request Oct 15, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants