Home Page

Tips page
c
cellulari
debian
egittologia
emacs
emacs-latex
hardware
html
inglese
java

*Execute a command
*The correct way to use process.waitFor() method

latex
linux
matlab
misc
mysql
network
octave
programming
python
security
sed
tech
webapps
windows

University Page

Programming

Debian & Linux

Some works

About me

Del.icio.us Bookmarks

BOINC Combined Statistics

Site Statistics

Contact me sending an e-mail (antispam defense activated)

debian

hacker emblem

blogger

GeoURL

View Sandro Tosi's profile on LinkedIn

This is my Google PageRank

Title: The correct way to use process.waitFor() method
Author: Sandro Tosi
Last modified: 2005-02-06

The correct  way to use  the process.waitFor() method is  described  in
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html    and
substantially is this:

1. use thread to launch a program
2. process  output of  that  process (Runtime.exec()  has a  limitated
   buffer size: once it's full the Java process hangs)
3. after processing the output, finally execute process.waitFor()