This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in executing a while loop  RSS feed

 
rajashree loganayagi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wrote a socket program, which needs to run a shell program in the client-side for every 10secs. The output of the shell program has to be sent to the server.

The problem is in the client-side, where i need to run the shell continuously whithout any break.

For this i used while loop which is set to true. But i cant run the shell program continuously. i noticed that the client side runs for upto 6 or 7times and remains silent.

Here the the following codes:


This code works fine with smaller amount of input. But for larger case it doesn't works.

Can anyone help me....


Thanks in advance.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When Runtime.exec() won't. Read it, not reading from p1.getErrorStream() is the likely cause of your problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!