output buffer empty until tcpdump is killed
<p>I am running the tcpdump on my android emulator and since the tcpdump is running in the background there isnt any data in the buffer and hence the application is stuck at this point.
here is the part of the code:</p>

<pre><code>else if (tcpdumpButton.isChecked())
           {
              try
              {
                 Process process1 = Runtime.getRuntime().exec("tcpdump");
                 DataOutputStream os = new DataOutputStream(process1.getOutputStream());
                 BufferedReader osRes = new BufferedReader(new InputStreamReader(process1.getInputStream()));
                 //ByteArrayInputStream osRes = (ByteArrayInputStream) process1.getInputStream();
                 // os.writeBytes("tcpdump -l port 80");
                 os.flush();
                 StringBuffer output = new StringBuffer();
                 try
                 {
                    while ((osRes.readLine()) != null)
                    {
                       output.append(osRes.readLine());
                       output.append("\n");
                    }
                 }
                 catch (Exception e)
                 {
                    throw e;
                 }
                 process1.waitFor();
                 tv.setText(output);
                 setContentView(tv);
              }
              catch (Exception e)
              {
                 throw e;
              }
</code></pre>

<p>any help?</p>
