Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Apr 1, 2022
1 parent 02e9e0a commit e572d16
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
17 changes: 15 additions & 2 deletions src/net/freertr/pipe/pipeShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import net.freertr.util.bits;
import net.freertr.util.cmds;

Expand Down Expand Up @@ -129,7 +130,7 @@ public boolean isRunning() {
/**
* kill the whole process
*/
public synchronized void kill() {
public void kill() {
kill(0);
}

Expand All @@ -140,10 +141,22 @@ public synchronized void kill() {
*/
protected synchronized void kill(int stat) {
running &= 0x7f - stat;
ProcessHandle[] childs = new ProcessHandle[0];
try {
Stream<ProcessHandle> descends = process.descendants();
childs = (ProcessHandle[]) descends.toArray();
} catch (Exception e) {
}
try {
process.destroy();
} catch (Exception e) {
}
for (int i = 0; i < childs.length; i++) {
try {
childs[i].destroy();
} catch (Exception e) {
}
}
bits.sleep(100);
try {
stdIn.close();
Expand Down Expand Up @@ -216,7 +229,7 @@ public String info() {
ProcessHandle hnd = null;
try {
hnd = process.toHandle();
a = "" + hnd.pid();
a = hnd.pid() + "|" + hnd.descendants().count();
} catch (Exception e) {
}
try {
Expand Down
4 changes: 2 additions & 2 deletions src/net/freertr/user/userShow.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public cfgAlias doer() {
return null;
}
if (a.equals("device")) {
userFormat l = new userFormat("|", "name|rerun|pid|cpu|last|ago");
userFormat l = new userFormat("|", "name|rerun|pid|chld|cpu|last|ago");
for (int i = 0; i < cfgInit.vdcLst.size(); i++) {
cfgVdc ntry = cfgInit.vdcLst.get(i);
l.add(ntry.getShow());
Expand All @@ -437,7 +437,7 @@ public cfgAlias doer() {
return null;
}
if (a.equals("external")) {
userFormat l = new userFormat("|", "name|rerun|pid|cpu|last|ago");
userFormat l = new userFormat("|", "name|rerun|pid|chld|cpu|last|ago");
for (int i = 0; i < cfgAll.prcs.size(); i++) {
cfgPrcss ntry = cfgAll.prcs.get(i);
l.add(ntry.getShow());
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v22.4.1-cur, done by cs@nop.
-;-;-;2022-04-01 09:14:43, took 00:08:27, with 80 workers, on 2804 cases, 0 failed, 0 traces, 0 retries
-;-;-;2022-04-01 11:26:27, took 00:08:01, with 80 workers, on 2804 cases, 0 failed, 0 traces, 3 retries
-;-;-;./rtr.bin
http://sources.freertr.net/cfg/basic.tst;basic.tst;success;dummy test
http://sources.freertr.net/cfg/conn-amt01.tst;conn-amt01.tst;success;amt over ipv4
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v22.4.1-cur, done by cs@nop.<br/>
tested: 2022-04-01 09:14:43, took 00:08:27, with 80 workers, on 2804 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2022-04-01 11:26:27, took 00:08:01, with 80 workers, on 2804 cases, 0 failed, 0 traces, 3 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit e572d16

Please sign in to comment.