J
jeffcouc
I have a strange behaviour with the Process.waitFor() method under
linux mdk 10.1 and java 1.4.2.
my jar archive reacha.jar launches an external programm via
Runtime.getRuntime().exec,
as done bellow,
proc = Runtime.getRuntime().exec("rv toto.rvqe");
proc.waitFor();
where rv is a shell that lauches a command eprover as shown bellow
gess 28182 0.2 1.6 218592 12532 pts/2 S<l+ 11:03 0:00 java
-jar reacha.jar test.mch
gess 29561 0.0 0.7 7424 6044 pts/2 S<+ 11:05 0:00
/usr/bin//rv toto.rvqe
gess 29727 0.0 0.1 2880 1424 pts/2 S<+ 11:05 0:00 sh -c
eprover ....
gess 29728 99.6 3.3 27376 26300 pts/2 R<+ 11:05 3:03 eprover
....
Sometime, when the eprover command spends a lot of time, and ends after
some minutes,
the method waitFor() does not seem to catch the end of the programm
and does not stop to wait...
gess 28182 0.2 1.6 218592 12532 pts/2 S<l+ 11:03 0:00 java
-jar reacha.jar test.mch
gess 29561 0.0 0.7 7424 6044 pts/2 S<+ 11:05 0:00
/usr/bin//rv toto.rvqe
When I launch by hand the programm rv, it stops alone after the end of
the eprover as shown bellow
gess 522 0.0 0.7 7424 6044 pts/2 S<+ 12:02 0:00 rv
toto.rvqe
gess 688 0.0 0.1 2876 1420 pts/2 S<+ 12:02 0:00 sh -c
eprover ...
gess 689 99.6 2.6 21436 20340 pts/2 R<+ 12:02 1:06 eprover
....
And next no more reference to rv by the ps aux command
Thank a lot for your help.
linux mdk 10.1 and java 1.4.2.
my jar archive reacha.jar launches an external programm via
Runtime.getRuntime().exec,
as done bellow,
proc = Runtime.getRuntime().exec("rv toto.rvqe");
proc.waitFor();
where rv is a shell that lauches a command eprover as shown bellow
gess 28182 0.2 1.6 218592 12532 pts/2 S<l+ 11:03 0:00 java
-jar reacha.jar test.mch
gess 29561 0.0 0.7 7424 6044 pts/2 S<+ 11:05 0:00
/usr/bin//rv toto.rvqe
gess 29727 0.0 0.1 2880 1424 pts/2 S<+ 11:05 0:00 sh -c
eprover ....
gess 29728 99.6 3.3 27376 26300 pts/2 R<+ 11:05 3:03 eprover
....
Sometime, when the eprover command spends a lot of time, and ends after
some minutes,
the method waitFor() does not seem to catch the end of the programm
and does not stop to wait...
gess 28182 0.2 1.6 218592 12532 pts/2 S<l+ 11:03 0:00 java
-jar reacha.jar test.mch
gess 29561 0.0 0.7 7424 6044 pts/2 S<+ 11:05 0:00
/usr/bin//rv toto.rvqe
When I launch by hand the programm rv, it stops alone after the end of
the eprover as shown bellow
gess 522 0.0 0.7 7424 6044 pts/2 S<+ 12:02 0:00 rv
toto.rvqe
gess 688 0.0 0.1 2876 1420 pts/2 S<+ 12:02 0:00 sh -c
eprover ...
gess 689 99.6 2.6 21436 20340 pts/2 R<+ 12:02 1:06 eprover
....
And next no more reference to rv by the ps aux command
Thank a lot for your help.