pinokiod 3.8.125 → 3.8.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/bin/index.js +1 -1
- package/kernel/index.js +6 -6
- package/kernel/peer.js +3 -3
- package/kernel/shell.js +1 -0
- package/kernel/shells.js +3 -0
- package/package.json +1 -1
package/kernel/bin/index.js
CHANGED
package/kernel/index.js
CHANGED
|
@@ -536,12 +536,12 @@ class Kernel {
|
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
// // kill all processes just in case
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
539
|
+
await new Promise((resolve, reject) => {
|
|
540
|
+
kill(process.pid, 'SIGKILL', () => {
|
|
541
|
+
console.log("child procs killed for", process.pid)
|
|
542
|
+
resolve()
|
|
543
|
+
});
|
|
544
|
+
})
|
|
545
545
|
|
|
546
546
|
this.info = new Info(this)
|
|
547
547
|
this.pipe = new Pipe(this)
|
package/kernel/peer.js
CHANGED
|
@@ -39,7 +39,7 @@ class PeerDiscovery {
|
|
|
39
39
|
console.log("kernel.peer start")
|
|
40
40
|
this.socket = dgram.createSocket('udp4');
|
|
41
41
|
this.socket.on('message', (msg, rinfo) => {
|
|
42
|
-
console.log("peer message", { msg, rinfo })
|
|
42
|
+
// console.log("peer message", { msg, rinfo })
|
|
43
43
|
const ip = rinfo.address;
|
|
44
44
|
// console.log({rinfo})
|
|
45
45
|
if (msg.toString() === this.message.toString() && this._isLocalLAN(ip)) {
|
|
@@ -64,13 +64,13 @@ class PeerDiscovery {
|
|
|
64
64
|
|
|
65
65
|
// Send broadcast pings every interval
|
|
66
66
|
this.interval_handle = setInterval(() => {
|
|
67
|
-
console.log("send message to peers")
|
|
67
|
+
// console.log("send message to peers")
|
|
68
68
|
//this.socket.send(this.message, 0, this.message.length, this.port, '127.0.0.1');
|
|
69
69
|
//console.log("sent to 127.0.0.1")
|
|
70
70
|
//this.socket.send(this.message, 0, this.message.length, this.port, '255.255.255.255');
|
|
71
71
|
this.socket.send(this.message, 0, this.message.length, this.port, '192.168.1.255');
|
|
72
72
|
//console.log("sent to 255.255.255.255")
|
|
73
|
-
console.log("sent message")
|
|
73
|
+
// console.log("sent message")
|
|
74
74
|
}, this.interval);
|
|
75
75
|
});
|
|
76
76
|
}
|
package/kernel/shell.js
CHANGED
package/kernel/shells.js
CHANGED
|
@@ -157,6 +157,7 @@ class Shells {
|
|
|
157
157
|
}
|
|
158
158
|
ondata(stream)
|
|
159
159
|
})
|
|
160
|
+
console.log("SHELL RESPONSE", response)
|
|
160
161
|
|
|
161
162
|
|
|
162
163
|
/*
|
|
@@ -245,10 +246,12 @@ class Shells {
|
|
|
245
246
|
line = line.replaceAll(err, "")
|
|
246
247
|
}
|
|
247
248
|
}
|
|
249
|
+
console.log("BEFORE SHELL RETURN 1")
|
|
248
250
|
|
|
249
251
|
// don't return if there's an error
|
|
250
252
|
return { id: sh.id, response, stdout: response, event: m, error: shortened_errs }
|
|
251
253
|
} else {
|
|
254
|
+
console.log("BEFORE SHELL RETURN 2")
|
|
252
255
|
// need to make a request
|
|
253
256
|
return { id: sh.id, response, stdout: response, event: m }
|
|
254
257
|
}
|