I'm using the java Runtime class to update files from a CVS repository and in some cases it is hanging (see comment in code).  I think this may have something to do with the buffer size for the standard input and output streams of the OS (Win2k).   If I close my java app the files do update correctly. Any ideas on how to resolve this?
 
Thanks
 
 
public String execute(String[] args) {
 
  StringBuffer result = new StringBuffer();
  String str;
  Process m;
 
  try {
 
   String [] cmd = {"cmd.exe","/c",args[0]};
   m = Runtime.getRuntime().exec(cmd);
 
   BufferedReader in =
    new BufferedReader(new InputStreamReader(
                               m.getInputStream()));
 
   while((str = in.readLine()) != null) {
    System.out.println(str);
    result.append("\n" + str);
   }
 
// *********** code hangs before it gets here ******************
 
   m.waitFor();
   System.out.println("Process exit code is:" + m.exitValue());
   
  }
  catch(Exception ex) {
   ex.printStackTrace ();
  }
  return result.toString();
 }
_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to