io-event 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/io/event/selector/epoll.c +9 -1
- data/lib/io/event/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbc13d55bf16de818e95478a83d0da64de1b9844bf92fd2970df3e8cc42d8240
|
4
|
+
data.tar.gz: 41e8fb1ad62705688c44ff774e44360ffef8223c8d308c01d1163b66b67c3abe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 878bb331d512cd99115da6451c07e06160fcf868e208280ef042d652be2d5cd606b1bb14623337ff1672729cb2f20b78f85232fd793a5baea274b3b5159a51ef
|
7
|
+
data.tar.gz: 85fc1b0faa924bb3c4f62de80262275a321f8b36a23954f110e9e78e7d7c156a0df62b3bdcc1feabaff14ab14107db6f37d51aa7ad0d00c139690b7231b482c4
|
@@ -231,6 +231,11 @@ VALUE IO_Event_Selector_EPoll_process_wait(VALUE self, VALUE fiber, VALUE pid, V
|
|
231
231
|
};
|
232
232
|
|
233
233
|
process_wait_arguments.descriptor = pidfd_open(process_wait_arguments.pid, 0);
|
234
|
+
|
235
|
+
if (process_wait_arguments.descriptor == -1) {
|
236
|
+
rb_sys_fail("IO_Event_Selector_EPoll_process_wait:pidfd_open");
|
237
|
+
}
|
238
|
+
|
234
239
|
rb_update_max_fd(process_wait_arguments.descriptor);
|
235
240
|
|
236
241
|
struct epoll_event event = {
|
@@ -241,6 +246,7 @@ VALUE IO_Event_Selector_EPoll_process_wait(VALUE self, VALUE fiber, VALUE pid, V
|
|
241
246
|
int result = epoll_ctl(data->descriptor, EPOLL_CTL_ADD, process_wait_arguments.descriptor, &event);
|
242
247
|
|
243
248
|
if (result == -1) {
|
249
|
+
close(process_wait_arguments.descriptor);
|
244
250
|
rb_sys_fail("IO_Event_Selector_EPoll_process_wait:epoll_ctl");
|
245
251
|
}
|
246
252
|
|
@@ -330,13 +336,15 @@ VALUE IO_Event_Selector_EPoll_io_wait(VALUE self, VALUE fiber, VALUE io, VALUE e
|
|
330
336
|
|
331
337
|
rb_update_max_fd(duplicate);
|
332
338
|
|
333
|
-
if (descriptor == -1)
|
339
|
+
if (descriptor == -1) {
|
334
340
|
rb_sys_fail("IO_Event_Selector_EPoll_io_wait:dup");
|
341
|
+
}
|
335
342
|
|
336
343
|
result = epoll_ctl(data->descriptor, EPOLL_CTL_ADD, descriptor, &event);
|
337
344
|
}
|
338
345
|
|
339
346
|
if (result == -1) {
|
347
|
+
if (duplicate >= 0) close(duplicate);
|
340
348
|
rb_sys_fail("IO_Event_Selector_EPoll_io_wait:epoll_ctl");
|
341
349
|
}
|
342
350
|
|
data/lib/io/event/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: io-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
+
- machty
|
9
|
+
- Benoit Daloze
|
10
|
+
- Delton Ding
|
8
11
|
autorequire:
|
9
12
|
bindir: bin
|
10
13
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
14
|
+
date: 2022-03-09 00:00:00.000000000 Z
|
12
15
|
dependencies:
|
13
16
|
- !ruby/object:Gem::Dependency
|
14
17
|
name: bake
|
@@ -120,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
123
|
- !ruby/object:Gem::Version
|
121
124
|
version: '0'
|
122
125
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
126
|
+
rubygems_version: 3.3.8
|
124
127
|
signing_key:
|
125
128
|
specification_version: 4
|
126
129
|
summary: An event loop.
|