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

STDerror is not correct give #1

Open
GoogleCodeExporter opened this issue Apr 27, 2015 · 0 comments
Open

STDerror is not correct give #1

GoogleCodeExporter opened this issue Apr 27, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

When testing this code on a panda device, i get broken pipe errors, while in 
fact i should see this error


/system/bin/id output: su: uid 10048 not allowed to su


The problem is that the sinkProcessOutput is started too late.


change in file shell.java
  private static String _runCommand(String command, OUTPUT o) throws IOException {
    DataOutputStream os = null;
    Process process = null;
    try {
      process = Runtime.getRuntime().exec(shell);
++      InputStreamHandler sh = sinkProcessOutput(process, o);
      os = new DataOutputStream(process.getOutputStream());
--      InputStreamHandler sh = sinkProcessOutput(process, o);
      os.writeBytes(command + '\n');
....


Like this you see the first stderr output


Kind regards,

Wim

Original issue reported on code.google.com by [email protected] on 3 Oct 2013 at 11:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant