fork 1.0.0 → 1.0.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 +7 -0
- data/LICENSE.txt +1 -1
- data/fork.gemspec +1 -1
- data/lib/fork.rb +9 -5
- data/lib/fork/version.rb +1 -1
- metadata +15 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0bf73cf7faba35e69bdc7a99d19a38ac2a32a49e
|
4
|
+
data.tar.gz: a028decdb4d3a24de872bbddd8dff7b4f73db75b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4250ab044899a74429a70b4f518318ab7e50dfe081080aff1f8c2dea673d9f3e6a8749c28ae82573ecc1be2be3499296d940de5f0839f28be262b33a99d0fff9
|
7
|
+
data.tar.gz: a9eb86ddf3306e06a56993927c9f7f9516580cd600e5bcf3bd6ebc93aadecdb0b2846a576758dea262095da92c8c0e8a3e44dd5b9036f0cd005afce628f2b8e4
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2012, Stefan Rusterholz <stefan.rusterholz@gmail.com>
|
1
|
+
Copyright (c) 2012-2014, Stefan Rusterholz <stefan.rusterholz@gmail.com>
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
data/fork.gemspec
CHANGED
data/lib/fork.rb
CHANGED
@@ -565,6 +565,7 @@ class Fork
|
|
565
565
|
end
|
566
566
|
|
567
567
|
private
|
568
|
+
|
568
569
|
# @private
|
569
570
|
# Work around issues in 1.9.3-p194 (it has difficulties with the encoding settings of
|
570
571
|
# the pipes).
|
@@ -573,11 +574,15 @@ private
|
|
573
574
|
# Returns a pair of IO instances, just like IO::pipe. The IO's encoding is set to
|
574
575
|
# binary.
|
575
576
|
def binary_pipe
|
576
|
-
|
577
|
-
|
578
|
-
|
577
|
+
if defined?(Encoding::BINARY)
|
578
|
+
in_io, out_io = IO.pipe(Encoding::BINARY)
|
579
|
+
in_io.set_encoding(Encoding::BINARY)
|
580
|
+
out_io.set_encoding(Encoding::BINARY)
|
579
581
|
|
580
|
-
|
582
|
+
[in_io, out_io]
|
583
|
+
else
|
584
|
+
IO.pipe
|
585
|
+
end
|
581
586
|
end
|
582
587
|
|
583
588
|
# @private
|
@@ -613,7 +618,6 @@ private
|
|
613
618
|
rescue *IgnoreExceptions
|
614
619
|
raise # reraise ignored exceptions as-is
|
615
620
|
rescue Exception => e
|
616
|
-
$stdout.puts "Exception in child #{$$}: #{e}", *e.backtrace.first(5)
|
617
621
|
if handle_exceptions?
|
618
622
|
begin
|
619
623
|
Fork.write_marshalled(@ctrl, [:exception, e])
|
data/lib/fork/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,54 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Stefan Rusterholz
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
15
|
-
with forks easy.
|
16
|
-
|
17
|
-
It provides a simple interface to create forked futures, get the return value of
|
18
|
-
the
|
19
|
-
|
13
|
+
description: |-
|
14
|
+
Represents forks (child processes) as objects and makes interaction with forks easy.
|
15
|
+
It provides a simple interface to create forked futures, get the return value of the
|
20
16
|
fork, get an exception raised in the fork, and to send objects between parent and
|
21
|
-
|
22
|
-
forked process.'
|
17
|
+
forked process.
|
23
18
|
email: stefan.rusterholz@gmail.com
|
24
19
|
executables: []
|
25
20
|
extensions: []
|
26
21
|
extra_rdoc_files: []
|
27
22
|
files:
|
28
|
-
-
|
23
|
+
- LICENSE.txt
|
24
|
+
- README.markdown
|
25
|
+
- Rakefile
|
26
|
+
- fork.gemspec
|
29
27
|
- lib/fork.rb
|
28
|
+
- lib/fork/version.rb
|
30
29
|
- test/lib/helper.rb
|
31
30
|
- test/runner.rb
|
32
31
|
- test/unit/fork.rb
|
33
|
-
- fork.gemspec
|
34
|
-
- LICENSE.txt
|
35
|
-
- Rakefile
|
36
|
-
- README.markdown
|
37
32
|
homepage: https://github.com/apeiros/fork
|
38
33
|
licenses: []
|
34
|
+
metadata: {}
|
39
35
|
post_install_message:
|
40
36
|
rdoc_options: []
|
41
37
|
require_paths:
|
42
38
|
- lib
|
43
39
|
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
|
-
- -
|
41
|
+
- - ">="
|
47
42
|
- !ruby/object:Gem::Version
|
48
43
|
version: '0'
|
49
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - ">"
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: 1.3.1
|
55
49
|
requirements: []
|
56
50
|
rubyforge_project:
|
57
|
-
rubygems_version:
|
51
|
+
rubygems_version: 2.2.1
|
58
52
|
signing_key:
|
59
53
|
specification_version: 3
|
60
54
|
summary: Represents forks (child processes) as objects and makes interaction with
|