isomorfeus-speednode 0.4.0 → 0.4.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bb65853d666ae62943ed28b887dc6792c83c34bd7ed090d7bc817a42e40c63e
|
4
|
+
data.tar.gz: '0227178ecf8760e07f32043beba064258da9efa6baa221c96b0437ee12a6fc80'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee26a18eb0e0209f543ce01cf240824edd3d00c8590a57c72a0422680c48127318a4111f7417f424b48ae8ffbc72b43c3bac7c03da8ee62baa265a49880471e8
|
7
|
+
data.tar.gz: a9da737b51f2b115bac2c218d2abc0618b443daa2cc2cd380991a30b4b4a998cb6c2497356d30279f04e717c86cf61a557173506b19859b711ca895a10880d75
|
@@ -312,10 +312,12 @@ let server = net.createServer(function(s) {
|
|
312
312
|
if (err.message.includes('circular')) { outputJSON = CircularJSON.stringify(result); }
|
313
313
|
else { outputJSON = JSON.stringify([['', err].join(''), err.stack]); }
|
314
314
|
s.write([outputJSON, "\x04"].join(''));
|
315
|
+
if (process_exit !== false) { process.exit(process_exit); }
|
315
316
|
return;
|
316
317
|
}
|
317
318
|
|
318
|
-
s.write([outputJSON, "\x04"].join(''));
|
319
|
+
try { s.write([outputJSON, "\x04"].join('')); }
|
320
|
+
catch (err) {}
|
319
321
|
if (process_exit !== false) { process.exit(process_exit); }
|
320
322
|
});
|
321
323
|
});
|
@@ -57,7 +57,7 @@ module Isomorfeus
|
|
57
57
|
|
58
58
|
def self.finalize(socket, socket_dir, socket_path, pid)
|
59
59
|
proc do
|
60
|
-
Isomorfeus::Speednode::Runtime.responders
|
60
|
+
Isomorfeus::Speednode::Runtime.responders[socket_path].kill if Isomorfeus::Speednode::Runtime.responders[socket_path]
|
61
61
|
exit_node(socket, socket_dir, socket_path, pid)
|
62
62
|
end
|
63
63
|
end
|
@@ -65,14 +65,18 @@ module Isomorfeus
|
|
65
65
|
def self.exit_node(socket, socket_dir, socket_path, pid)
|
66
66
|
VMCommand.new(socket, "exit", [0]).execute
|
67
67
|
socket.close
|
68
|
-
File.unlink(socket_path)
|
69
|
-
Dir.rmdir(socket_dir)
|
68
|
+
File.unlink(socket_path) if File.exist?(socket_path)
|
69
|
+
Dir.rmdir(socket_dir) if socket_dir && Dir.exist?(socket_dir)
|
70
70
|
if Gem.win_platform?
|
71
71
|
# SIGINT or SIGKILL are unreliable on Windows, try native taskkill first
|
72
|
-
|
72
|
+
unless system("taskkill /f /t /pid #{pid} >NUL 2>NUL")
|
73
|
+
Process.kill('KILL', pid) rescue nil
|
74
|
+
end
|
73
75
|
else
|
74
|
-
Process.kill
|
76
|
+
Process.kill('KILL', pid) rescue nil
|
75
77
|
end
|
78
|
+
rescue
|
79
|
+
nil
|
76
80
|
end
|
77
81
|
|
78
82
|
def eval(context, source)
|
@@ -159,6 +163,7 @@ module Isomorfeus
|
|
159
163
|
end
|
160
164
|
|
161
165
|
ObjectSpace.define_finalizer(self, self.class.finalize(@socket, @socket_dir, @socket_path, @pid))
|
166
|
+
Kernel.at_exit { self.class.finalize(@socket, @socket_dir, @socket_path, @pid).call }
|
162
167
|
end
|
163
168
|
|
164
169
|
def create_responder(context)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-speednode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|